游戏开发论坛

 找回密码
 立即注册
搜索
查看: 9878|回复: 13

DIRECT x9.0 sdk 与vc++6.0可以配合使用吗?

[复制链接]

6

主题

24

帖子

24

积分

注册会员

Rank: 2

积分
24
发表于 2005-4-21 15:56:00 | 显示全部楼层 |阅读模式
我装了direct x9.0 sdk,使用vc++6.0.不知道为什么只是加入了#include <dsound.h>,程序就有错了。错误如下:
include\dsound.h(230) : error C2143: syntax error : missing ';' before '*'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(230) : error C2501: 'LPCWAVEFORMATEX' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(349) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(349) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(349) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(365) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(365) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(365) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(416) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(416) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(416) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(425) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(425) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(425) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiers
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(686) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(696) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(770) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(780) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(1041) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(1099) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'
e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800
e:\microsoft visual studio\vc98\include\mmsystem.h(728) : error C2373: 'WAVEFORMATEX' : redefinition; different type modifiers
        e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(230) : see declaration of 'WAVEFORMATEX'
e:\microsoft visual studio\vc98\include\mmsystem.h(729) : error C2378: 'LPCWAVEFORMATEX' : redefinition; symbol cannot be overloaded with a typedef
        e:\program files\microsoft directx 9.0 sdk (february 2005)\include\dsound.h(230) : see declaration of 'LPCWAVEFORMATEX'
e:\microsoft visual studio\vc98\include\mmsystem.h(774) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
e:\microsoft visual studio\vc98\include\mmsystem.h(830) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'
Error executing cl.exe.

FRIGHT.exe - 30 error(s), 0 warning(s)
请问是否我装的directx 不行?

6

主题

24

帖子

24

积分

注册会员

Rank: 2

积分
24
 楼主| 发表于 2005-4-21 15:58:00 | 显示全部楼层

Re:DIRECT x9.0 sdk 与vc++6.0可以配合使用吗?

再顶下:
错误 都在dsound.h里面,是否我装的的directx 不行?

5

主题

8

帖子

8

积分

新手上路

Rank: 1

积分
8
发表于 2005-4-22 09:29:00 | 显示全部楼层

Re:DIRECT x9.0 sdk 与vc++6.0可以配合使用吗?

你把 dsound.h头文件里的DROWD_PTR改为 DROWD即可,我试过!

6

主题

24

帖子

24

积分

注册会员

Rank: 2

积分
24
 楼主| 发表于 2005-4-22 13:08:00 | 显示全部楼层

Re:DIRECT x9.0 sdk 与vc++6.0可以配合使用吗?

谢谢!我去试下!

6

主题

24

帖子

24

积分

注册会员

Rank: 2

积分
24
 楼主| 发表于 2005-4-22 13:23:00 | 显示全部楼层

Re:DIRECT x9.0 sdk 与vc++6.0可以配合使用吗?

不行啊!会在其他地方出错,不知是什么原因??
哪位朋友可以告诉我是否是我自己弄错还是版本不对头啊?

69

主题

335

帖子

343

积分

中级会员

Rank: 3Rank: 3

积分
343
QQ
发表于 2005-4-22 14:10:00 | 显示全部楼层

Re:DIRECT x9.0 sdk 与vc++6.0可以配合使用吗?

没加载Lib

6

主题

24

帖子

24

积分

注册会员

Rank: 2

积分
24
 楼主| 发表于 2005-4-22 16:17:00 | 显示全部楼层

Re:DIRECT x9.0 sdk 与vc++6.0可以配合使用吗?

有加载啊。
我在很多细节的地方都查了,可一加上代码:include <dsound.h>后就有错,删了就没错了。就算是vc系统生成的最原始的代码也会错啊!

24

主题

229

帖子

229

积分

中级会员

Rank: 3Rank: 3

积分
229
发表于 2005-4-22 18:47:00 | 显示全部楼层

Re:DIRECT x9.0 sdk 与vc++6.0可以配合使用吗?

dx9.0b是可以用在vc6的。看看你的版本会不会太高了。

我也是菜鸟,你试试看吧

6

主题

24

帖子

24

积分

注册会员

Rank: 2

积分
24
 楼主| 发表于 2005-4-22 22:19:00 | 显示全部楼层

Re:DIRECT x9.0 sdk 与vc++6.0可以配合使用吗?

谢谢!今天我又发现了个有趣的问题,就是第一次编译时有25个错误,但都是dinput.h里面的,可第二次就没事了。
然而还有个问题啊--用debugj时没错,可换成release时就有错误了。错误如下:
Linking...
nafxcw.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcw.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Release/canvas.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
哪位朋友可以告诉我是怎么回事?

2

主题

7

帖子

7

积分

新手上路

Rank: 1

积分
7
发表于 2005-4-23 00:41:00 | 显示全部楼层

Re:DIRECT x9.0 sdk 与vc++6.0可以配合使用吗?

好像SDK的不同版本不兼容
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2025-12-25 12:09

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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