Jump to content
  • Advertisement
Sign in to follow this  
POLSKASH

200+ errors

This topic is 4750 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After compiling what once was error-free code, I get this massive 200+ compilation error report. I'm sure it's just a small error somewhere in my code, but I don't know what to look for. The error report starts like this, basically a whole bunch of re-definition errors: c:\dxsdk\include\d3dx9.h(21) : warning C4005: 'D3DX_DEFAULT' : macro redefinition c:\dxsdk\include\d3dx8.h(33) : see previous definition of 'D3DX_DEFAULT' c:\dxsdk\include\d3dx9math.h(88) : error C2011: 'D3DXVECTOR2' : 'struct' type redefinition c:\dxsdk\include\d3dx9math.h(162) : error C2011: 'D3DXVECTOR3' : 'struct' type redefinition c:\dxsdk\include\d3dx9math.h(237) : error C2011: 'D3DXVECTOR4' : 'struct' type redefinition c:\dxsdk\include\d3dx9math.h(310) : error C2011: 'D3DXMATRIX' : 'struct' type redefinition c:\dxsdk\include\d3dx9math.h(378) : error C2011: '_D3DXMATRIXA16' : 'struct' type redefinition c:\dxsdk\include\d3dx9math.h(424) : error C2011: 'D3DXQUATERNION' : 'struct' type redefinition c:\dxsdk\include\d3dx9math.h(470) : error C2011: 'D3DXPLANE' : 'struct' type redefinition c:\dxsdk\include\d3dx9math.h(502) : error C2011: 'D3DXCOLOR' : 'struct' type redefinition c:\dxsdk\include\d3dx9math.h(776) : error C2143: syntax error : missing ',' before '*' c:\dxsdk\include\d3dx9math.h(776) : error C2059: syntax error : '*' c:\dxsdk\include\d3dx9math.h(777) : error C2733: second C linkage of overloaded function 'D3DXVec3Project' not allowed c:\dxsdk\include\d3dx9math.h(776) : see declaration of 'D3DXVec3Project' c:\dxsdk\include\d3dx9math.h(781) : error C2143: syntax error : missing ',' before '*' c:\dxsdk\include\d3dx9math.h(781) : error C2059: syntax error : '*' c:\dxsdk\include\d3dx9math.h(782) : error C2733: second C linkage of overloaded function 'D3DXVec3Unproject' not allowed c:\dxsdk\include\d3dx9math.h(781) : see declaration of 'D3DXVec3Unproject' c:\dxsdk\include\d3dx9math.h(786) : error C2143: syntax error : missing ',' before '*' c:\dxsdk\include\d3dx9math.h(786) : error C2059: syntax error : '*' Does anyone know of a common mistake that produces something like this? If I have to post code, I will, but I'd rather just find the error myself with a little help. Thanks!

Share this post


Link to post
Share on other sites
Advertisement
You're probably including the same header file(s) more then once, ence the redifinition errors.

Share this post


Link to post
Share on other sites
Quote:
Original post by POLSKASH

c:\dxsdk\include\d3dx9.h(21) : warning C4005: 'D3DX_DEFAULT' : macro redefinition
c:\dxsdk\include\d3dx8.h(33) : see previous definition of 'D3DX_DEFAULT'



Oops. Two different versions of basically the same library are included. They define huge numbers of overlapping things. This leads to chaos - things only can be defined once; otherwise, how is the compiler to know which version to use at any given time?

Share this post


Link to post
Share on other sites
Quote:
Original post by Zahlman
Quote:
Original post by POLSKASH

c:\dxsdk\include\d3dx9.h(21) : warning C4005: 'D3DX_DEFAULT' : macro redefinition
c:\dxsdk\include\d3dx8.h(33) : see previous definition of 'D3DX_DEFAULT'



Oops. Two different versions of basically the same library are included. They define huge numbers of overlapping things. This leads to chaos - things only can be defined once; otherwise, how is the compiler to know which version to use at any given time?

In other words, just include dsdx9.
(Unless you are using DX8 in which case, whats the point?)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!