sal.h不包括在Path中的时间
sal.h not including when it is in Path
我正在将DirectSound实现到一个程序中,但它需要dsound.h,而dsound.h需要sal.h,无论出于什么原因,我都很难让g++识别出我有sal.h,它在路径文件中,我甚至可以键入直接命令sal.h
,命令提示符将打开sal.h。但当我使用编译时
g++-3 World.cpp -c
我得到
dsound.h:13:17: sal.h: No such file or directory.
由于缺少sal.h,dsound.h出现了数千个错误。我只是使用记事本、g++和命令提示符,sal.h需要使用VC++吗?没有DirectSound有什么方法可以使用吗?
以下是我正在编译的代码的开头,以防万一:
#include "WorldEntity.h"
#include "MBox.h"
#include <D3D9.h>
#include <d3dx9.h>
#include <string>
#include <sstream>
#define _USE_MATH_DEFINES
#include <math.h>
#define KEYDOWN(vk_code)((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)
#define KEYUP(vk_code)((GetAsyncKeyState(vk_code) & 0x8000) ? 0 : 1)
using namespace std;
World::World()
{
//Etc
以下是WorldEntity.h的开头,它是包含dsound.h的包含文件:
#ifndef WORLDENTITY_H
#define WORLDENTITY_H
class Entity;
class HUD;
#include "Enums.h"
#include "Object.h"
#include "Inventory.h"
#include "AI.h"
#include "Item.h"
#include "Sector.h"
#include "MBox.h"
#include "Particle.h"
#include "Sprite.h"
#include <windows.h>
#include <windows.h>
#include <mmsystem.h>
#include <mmreg.h>
#include <dsound.h>
#include <string>
#include <D3D9.h>
#include <d3dx9.h>
#include <cstdlib>
#include <ctime>
using namespace std;
enum FontIndex
{
//Etc
命令路径与包含路径。您必须将-I
标志添加到GCC中,以告诉它在哪里可以找到头文件:
g++-3 -IC:somepath World.cpp -c
相关文章:
- C++为构建时间获取QDateTime的可靠方法
- 从持续时间构造std::chrono::system_clock::time_point
- 向量 <int> a {N, 0} 和 int arr a[N] = {0} 的时间复杂度有什么区别
- while循环中while循环的时间复杂度是多少
- 使用简单类型列表实现的指数编译时间.为什么
- 是否可以在编译时初始化数组,以便在运行时不会花费时间?
- 在已经使用Git的情况下减少编译时间
- 有没有一种方法可以创建一个带有哈希表的数据库,该哈希表具有恒定时间查找功能
- 如何将包含epoch时间的十六进制字符串转换为time_t
- 从文本文件中读取时钟时间和事件时间并进行处理
- 具有未知值时的时间复杂性
- 如何减少花费的时间
- C++在变量给定的指定时间内关闭电脑
- rcpp函数中的清理时间很长
- C++:floor unix时间戳到UTC月份
- 如何在c++中录制具有精确帧时间戳的视频
- 在两台机器之间进行时间戳的最佳c++chrono函数是什么
- 在 Windows 上,是否可以让 dll 在不使用 PATH 环境变量的情况下在另一个文件夹中查找依赖项?
- KMP算法和LPS表构造的运行时间
- sal.h不包括在Path中的时间