|
|
用VC6.0编译directsound的程序,总是出现如下错误。上网搜索了很多帖子,发现很多人都遇到这种现象,但是就是没有找到一个很好的解决方法。编译提示是dsound.h文件里面出错了。看过一篇帖子,说是VC6.0的sdk太旧了,与现在的DX9不兼容,但是我下载了一个新的windows 2003 sp1 sdk安装了,一样出现这些错误。还有一些帖子说可能有的LIB文件没有包含进工程,但是我已经把dxguid.lib winmm.lib dsound.lib都加进工程了啊。有人又说头文件的包含顺序不对,要把mmsystem.h放在dsound.h之前,我的顺序依次是#include <mmsystem.h> #include <mmreg.h> #include <dsound.h>,也还是不行啊。郁闷!请高手指教一下,要怎样解决啊?
Compiling resources...
Compiling...
StdAfx.cpp
e:\我的资料\游戏编程\directx9 sdk\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
e:\我的资料\游戏编程\directx9 sdk\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
e:\我的资料\游戏编程\directx9 sdk\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
e:\我的资料\游戏编程\directx9 sdk\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
e:\我的资料\游戏编程\directx9 sdk\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
e:\我的资料\游戏编程\directx9 sdk\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
执行 cl.exe 时出错.
game.exe - 1 error(s), 0 warning(s) |
|