Public Group

# 200+ errors

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

## 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 on other sites
you sure you have the right libraries included? that's what it looks like to me.

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

##### Share on other sites
Make sure you have the right librarys set and also make sure your linker is set.

##### Share on other sites
Quote:
 Original post by POLSKASHc:\dxsdk\include\d3dx9.h(21) : warning C4005: 'D3DX_DEFAULT' : macro redefinitionc:\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 on other sites
Quote:
Original post by Zahlman
Quote:
 Original post by POLSKASHc:\dxsdk\include\d3dx9.h(21) : warning C4005: 'D3DX_DEFAULT' : macro redefinitionc:\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?)

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5
JoeJ
19

• 11
• 14
• 9
• 10
• 12
• ### Forum Statistics

• Total Topics
633003
• Total Posts
3009830
• ### Who's Online (See full list)

There are no registered users currently online

×