游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1266|回复: 0

请教高手:directsound头文件编译出错

[复制链接]

2

主题

2

帖子

0

积分

新手上路

Rank: 1

积分
0
发表于 2008-3-22 12:04:00 | 显示全部楼层 |阅读模式
用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)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-12-20 15:47

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表