游戏开发论坛

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

directx9编程时发生错误,有几百上千吧:<帮忙看看

[复制链接]

31

主题

245

帖子

251

积分

中级会员

Rank: 3Rank: 3

积分
251
QQ
发表于 2004-2-13 10:47:00 | 显示全部楼层 |阅读模式
首先我创建一个基类
CBase :                  主要用于log文件输出,包括所以要用到的头文件
CMInput: public CBase :  用于处理键盘
CSound:  public CBase :  用于处理声音
CSprite: public CBase :  于处理敌人,运动...
CGame  : public CBase :  将CMInput, CSound, CSprite结合起来构成游戏
                         要包含sound.h,minput.h,sprite.h
Main.cpp: 初始化game以及循环

在link里加入
strmiids.lib dsound.lib dxguid.lib Dinput8.lib winmm.lib ddraw.lib

1.运行,考!n个错误
trmiids.lib(strmiids.obj) :
error LNK2005: _IID_IKsPropertySet already defined in MDInput.obj
...

2.如果取消strmiids.lib
Sound.obj : error LNK2001: unresolved external symbol _IID_IGraphBuilder
3.恢复strmiids.lib
并且取消CSound类(与之相关的类型取消)
编译通过,正常游戏,奶奶的就是这个csound有问题啊

请高手指点,我用的时directx9库
[em20]
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2025-2-25 05:58

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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