游戏开发论坛

 找回密码
 立即注册
搜索
查看: 3282|回复: 5

初学者求助!

[复制链接]

1

主题

5

帖子

9

积分

新手上路

Rank: 1

积分
9
发表于 2004-10-12 14:39:00 | 显示全部楼层 |阅读模式
在GamesRes文档中心的"Direct3D程序中运用碰撞检测"那篇文章中下载的源代码编译无法通过,请大家帮帮小弟我!谢谢了!

文章出处:

http://www.gameres.com/Articles/Program/Visual/3D/Collision.htm

60

主题

1319

帖子

1319

积分

金牌会员

Rank: 6Rank: 6

积分
1319
发表于 2004-10-12 14:45:00 | 显示全部楼层

Re:初学者求助!

把错误提示贴出来看看

1

主题

5

帖子

9

积分

新手上路

Rank: 1

积分
9
 楼主| 发表于 2004-10-12 16:57:00 | 显示全部楼层

Re:初学者求助!

好的,

--------------------Configuration: WS2 - Win32 Debug--------------------
Compiling...
TheFPSMain.cpp
d:\工具\dx9sdk\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800
d:\工具\dx9sdk\include\d3dx9.h(21) : warning C4005: 'D3DX_DEFAULT' : macro redefinition
        d:\工具\dx9sdk\include\d3dx8.h(33) : see previous definition of 'D3DX_DEFAULT'
d:\工具\dx9sdk\include\d3dx9math.h(88) : error C2011: 'D3DXVECTOR2' : 'struct' type redefinition
d:\工具\dx9sdk\include\d3dx9math.h(162) : error C2011: 'D3DXVECTOR3' : 'struct' type redefinition
d:\工具\dx9sdk\include\d3dx9math.h(237) : error C2011: 'D3DXVECTOR4' : 'struct' type redefinition
d:\工具\dx9sdk\include\d3dx9math.h(310) : error C2011: 'D3DXMATRIX' : 'struct' type redefinition
d:\工具\dx9sdk\include\d3dx9math.h(378) : error C2011: '_D3DXMATRIXA16' : 'struct' type redefinition
d:\工具\dx9sdk\include\d3dx9math.h(424) : error C2011: 'D3DXQUATERNION' : 'struct' type redefinition
d:\工具\dx9sdk\include\d3dx9math.h(470) : error C2011: 'D3DXPLANE' : 'struct' type redefinition
d:\工具\dx9sdk\include\d3dx9math.h(502) : error C2011: 'D3DXCOLOR' : 'struct' type redefinition
d:\工具\dx9sdk\include\d3dx9math.h(776) : error C2143: syntax error : missing ',' before '*'
d:\工具\dx9sdk\include\d3dx9math.h(776) : error C2059: syntax error : '*'
d:\工具\dx9sdk\include\d3dx9math.h(777) : error C2733: second C linkage of overloaded function 'D3DXVec3Project' not allowed
        d:\工具\dx9sdk\include\d3dx9math.h(776) : see declaration of 'D3DXVec3Project'
d:\工具\dx9sdk\include\d3dx9math.h(781) : error C2143: syntax error : missing ',' before '*'
d:\工具\dx9sdk\include\d3dx9math.h(781) : error C2059: syntax error : '*'
d:\工具\dx9sdk\include\d3dx9math.h(782) : error C2733: second C linkage of overloaded function 'D3DXVec3Unproject' not allowed
        d:\工具\dx9sdk\include\d3dx9math.h(781) : see declaration of 'D3DXVec3Unproject'
d:\工具\dx9sdk\include\d3dx9math.h(786) : error C2143: syntax error : missing ',' before '*'
d:\工具\dx9sdk\include\d3dx9math.h(786) : error C2059: syntax error : '*'
d:\工具\dx9sdk\include\d3dx9math.h(791) : error C2143: syntax error : missing ',' before '*'
d:\工具\dx9sdk\include\d3dx9math.h(791) : error C2059: syntax error : '*'
d:\工具\dx9sdk\include\d3dx9math.h(1283) : error C2011: 'ID3DXMatrixStack' : 'struct' type redefinition
d:\工具\dx9sdk\include\d3dx9math.inl(67) : error C2084: function '__thiscall D3DXVECTOR2:3DXVECTOR2(const float *)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(79) : error C2511: 'D3DXVECTOR2::D3DXVECTOR2' : overloaded member function 'void (const struct D3DXFLOAT16 *)' not found in 'D3DXVECTOR2'
        d:\工具\dx9sdk\include\d3dx8math.h(43) : see declaration of 'D3DXVECTOR2'
d:\工具\dx9sdk\include\d3dx9math.inl(90) : error C2084: function '__thiscall D3DXVECTOR2::D3DXVECTOR2(float,float)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(103) : error C2084: function '__thiscall D3DXVECTOR2:perator`float *'(void)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(109) : error C2084: function '__thiscall D3DXVECTOR2::operator`const float *'(void) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(116) : error C2084: function 'struct D3DXVECTOR2 &__thiscall D3DXVECTOR2::operator +=(const struct D3DXVECTOR2 &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(124) : error C2084: function 'struct D3DXVECTOR2 &__thiscall D3DXVECTOR2::operator -=(const struct D3DXVECTOR2 &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(132) : error C2084: function 'struct D3DXVECTOR2 &__thiscall D3DXVECTOR2::operator *=(float)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(140) : error C2084: function 'struct D3DXVECTOR2 &__thiscall D3DXVECTOR2::operator /=(float)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(150) : error C2084: function 'struct D3DXVECTOR2 __thiscall D3DXVECTOR2::operator +(void) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(156) : error C2084: function 'struct D3DXVECTOR2 __thiscall D3DXVECTOR2::operator -(void) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(157) : error C2264: 'D3DXVECTOR2::D3DXVECTOR2' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(163) : error C2084: function 'struct D3DXVECTOR2 __thiscall D3DXVECTOR2::operator +(const struct D3DXVECTOR2 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(164) : error C2264: 'D3DXVECTOR2::D3DXVECTOR2' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(169) : error C2084: function 'struct D3DXVECTOR2 __thiscall D3DXVECTOR2::operator -(const struct D3DXVECTOR2 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(170) : error C2264: 'D3DXVECTOR2::D3DXVECTOR2' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(175) : error C2084: function 'struct D3DXVECTOR2 __thiscall D3DXVECTOR2::operator *(float) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(176) : error C2264: 'D3DXVECTOR2::D3DXVECTOR2' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(181) : error C2084: function 'struct D3DXVECTOR2 __thiscall D3DXVECTOR2::operator /(float) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(183) : error C2264: 'D3DXVECTOR2::D3DXVECTOR2' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(189) : error C2084: function 'struct D3DXVECTOR2 __cdecl operator *(float,const struct D3DXVECTOR2 &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(190) : error C2264: 'D3DXVECTOR2::D3DXVECTOR2' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(195) : error C2084: function 'int __thiscall D3DXVECTOR2::operator ==(const struct D3DXVECTOR2 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(201) : error C2084: function 'int __thiscall D3DXVECTOR2::operator !=(const struct D3DXVECTOR2 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(272) : error C2084: function '__thiscall D3DXVECTOR3::D3DXVECTOR3(const float *)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(285) : error C2084: function '__thiscall D3DXVECTOR3::D3DXVECTOR3(const struct _D3DVECTOR &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(293) : error C2511: 'D3DXVECTOR3::D3DXVECTOR3' : overloaded member function 'void (const struct D3DXFLOAT16 *)' not found in 'D3DXVECTOR3'
        d:\工具\dx9sdk\include\d3dx8math.h(86) : see declaration of 'D3DXVECTOR3'
d:\工具\dx9sdk\include\d3dx9math.inl(304) : error C2084: function '__thiscall D3DXVECTOR3::D3DXVECTOR3(float,float,float)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(314) : error C2084: function '__thiscall D3DXVECTOR3::operator`float *'(void)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(320) : error C2084: function '__thiscall D3DXVECTOR3::operator`const float *'(void) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(328) : error C2084: function 'struct D3DXVECTOR3 &__thiscall D3DXVECTOR3::operator +=(const struct D3DXVECTOR3 &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(337) : error C2084: function 'struct D3DXVECTOR3 &__thiscall D3DXVECTOR3::operator -=(const struct D3DXVECTOR3 &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(346) : error C2084: function 'struct D3DXVECTOR3 &__thiscall D3DXVECTOR3::operator *=(float)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(355) : error C2084: function 'struct D3DXVECTOR3 &__thiscall D3DXVECTOR3::operator /=(float)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(367) : error C2084: function 'struct D3DXVECTOR3 __thiscall D3DXVECTOR3::operator +(void) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(373) : error C2084: function 'struct D3DXVECTOR3 __thiscall D3DXVECTOR3::operator -(void) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(374) : error C2264: 'D3DXVECTOR3::D3DXVECTOR3' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(381) : error C2084: function 'struct D3DXVECTOR3 __thiscall D3DXVECTOR3::operator +(const struct D3DXVECTOR3 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(382) : error C2264: 'D3DXVECTOR3::D3DXVECTOR3' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(387) : error C2084: function 'struct D3DXVECTOR3 __thiscall D3DXVECTOR3::operator -(const struct D3DXVECTOR3 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(388) : error C2264: 'D3DXVECTOR3::D3DXVECTOR3' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(393) : error C2084: function 'struct D3DXVECTOR3 __thiscall D3DXVECTOR3::operator *(float) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(394) : error C2264: 'D3DXVECTOR3::D3DXVECTOR3' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(399) : error C2084: function 'struct D3DXVECTOR3 __thiscall D3DXVECTOR3::operator /(float) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(401) : error C2264: 'D3DXVECTOR3::D3DXVECTOR3' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(407) : error C2084: function 'struct D3DXVECTOR3 __cdecl operator *(float,const struct D3DXVECTOR3 &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(408) : error C2264: 'D3DXVECTOR3::D3DXVECTOR3' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(414) : error C2084: function 'int __thiscall D3DXVECTOR3::operator ==(const struct D3DXVECTOR3 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(420) : error C2084: function 'int __thiscall D3DXVECTOR3::operator !=(const struct D3DXVECTOR3 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(504) : error C2084: function '__thiscall D3DXVECTOR4::D3DXVECTOR4(const float *)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(518) : error C2511: 'D3DXVECTOR4::D3DXVECTOR4' : overloaded member function 'void (const struct D3DXFLOAT16 *)' not found in 'D3DXVECTOR4'
        d:\工具\dx9sdk\include\d3dx8math.h(130) : see declaration of 'D3DXVECTOR4'
d:\工具\dx9sdk\include\d3dx9math.inl(529) : error C2084: function '__thiscall D3DXVECTOR4::D3DXVECTOR4(float,float,float,float)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(539) : error C2084: function '__thiscall D3DXVECTOR4::operator`float *'(void)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(545) : error C2084: function '__thiscall D3DXVECTOR4::operator`const float *'(void) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(553) : error C2084: function 'struct D3DXVECTOR4 &__thiscall D3DXVECTOR4::operator +=(const struct D3DXVECTOR4 &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(563) : error C2084: function 'struct D3DXVECTOR4 &__thiscall D3DXVECTOR4::operator -=(const struct D3DXVECTOR4 &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(573) : error C2084: function 'struct D3DXVECTOR4 &__thiscall D3DXVECTOR4::operator *=(float)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(583) : error C2084: function 'struct D3DXVECTOR4 &__thiscall D3DXVECTOR4::operator /=(float)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(596) : error C2084: function 'struct D3DXVECTOR4 __thiscall D3DXVECTOR4::operator +(void) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(602) : error C2084: function 'struct D3DXVECTOR4 __thiscall D3DXVECTOR4::operator -(void) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(603) : error C2264: 'D3DXVECTOR4::D3DXVECTOR4' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(610) : error C2084: function 'struct D3DXVECTOR4 __thiscall D3DXVECTOR4::operator +(const struct D3DXVECTOR4 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(611) : error C2264: 'D3DXVECTOR4::D3DXVECTOR4' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(616) : error C2084: function 'struct D3DXVECTOR4 __thiscall D3DXVECTOR4::operator -(const struct D3DXVECTOR4 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(617) : error C2264: 'D3DXVECTOR4::D3DXVECTOR4' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(622) : error C2084: function 'struct D3DXVECTOR4 __thiscall D3DXVECTOR4::operator *(float) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(623) : error C2264: 'D3DXVECTOR4::D3DXVECTOR4' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(628) : error C2084: function 'struct D3DXVECTOR4 __thiscall D3DXVECTOR4::operator /(float) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(630) : error C2264: 'D3DXVECTOR4::D3DXVECTOR4' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(636) : error C2084: function 'struct D3DXVECTOR4 __cdecl operator *(float,const struct D3DXVECTOR4 &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(637) : error C2264: 'D3DXVECTOR4::D3DXVECTOR4' : error in function definition or declaration; function not called
d:\工具\dx9sdk\include\d3dx9math.inl(643) : error C2084: function 'int __thiscall D3DXVECTOR4::operator ==(const struct D3DXVECTOR4 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(649) : error C2084: function 'int __thiscall D3DXVECTOR4::operator !=(const struct D3DXVECTOR4 &) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(725) : error C2084: function '__thiscall D3DXMATRIX::D3DXMATRIX(const float *)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(736) : error C2084: function '__thiscall D3DXMATRIX::D3DXMATRIX(const struct _D3DMATRIX &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(742) : error C2511: 'D3DXMATRIX::D3DXMATRIX' : overloaded member function 'void (const struct D3DXFLOAT16 *)' not found in 'D3DXMATRIX'
        d:\工具\dx9sdk\include\d3dx8math.h(174) : see declaration of 'D3DXMATRIX'
d:\工具\dx9sdk\include\d3dx9math.inl(756) : error C2084: function '__thiscall D3DXMATRIX::D3DXMATRIX(float,float,float,float,float,float,float,float,float,float,float,float,float,float,float,float)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(768) : error C2084: function 'float &__thiscall D3DXMATRIX::operator ()(unsigned int,unsigned int)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(774) : error C2084: function 'float __thiscall D3DXMATRIX::operator ()(unsigned int,unsigned int) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(782) : error C2084: function '__thiscall D3DXMATRIX::operator`float *'(void)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(788) : error C2084: function '__thiscall D3DXMATRIX::operator`const float *'(void) const' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(796) : error C2084: function 'struct D3DXMATRIX &__thiscall D3DXMATRIX::operator *=(const struct D3DXMATRIX &)' already has a body
d:\工具\dx9sdk\include\d3dx9math.inl(796) : fatal error C1003: error count exceeds 100; stopping compilation
Error executing cl.exe.

TheFPSMain.obj - 102 error(s), 1 warning(s)

不知道为何这么多错误。

1

主题

5

帖子

9

积分

新手上路

Rank: 1

积分
9
 楼主| 发表于 2004-10-12 18:05:00 | 显示全部楼层

Re:初学者求助!

请大家指点一下小弟我!
还有,能否再介绍一些3D碰撞检测的例程与源代码给我呢?非常感谢!!!

1

主题

5

帖子

9

积分

新手上路

Rank: 1

积分
9
 楼主| 发表于 2004-10-13 11:47:00 | 显示全部楼层

Re:初学者求助!

是我这个问题太菜了么?怎么没人理我呢?

1

主题

5

帖子

9

积分

新手上路

Rank: 1

积分
9
 楼主| 发表于 2004-10-13 13:02:00 | 显示全部楼层

Re:初学者求助!

换了dx8就成功了,为什么啊?
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

GMT+8, 2025-12-22 19:21

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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