Awkward compilation issues

Started by
3 comments, last by GameDev.net 17 years, 1 month ago
I recently had to reinstall Visual Studio 2005 and moved my previous opengl project back into the Projects directory on my system. For some strange reason when I compile my project its including "msxml.h" (which is not a part of my project) and it also complains that my "gl.h" has some missing symbols (I never modify gl.h). I never received these errors before I reinstalled VS 2005 and I was wondering if anyone could tell me the reason VS is being a pain. These are the errors that I am getting from the build output:

c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(1883) : error C2143: syntax error : missing ')' before 'constant'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(1883) : error C2143: syntax error : missing ';' before 'constant'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(1883) : error C2059: syntax error : ')'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(1883) : error C2238: unexpected token(s) preceding ';'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(2678) : error C2143: syntax error : missing ')' before 'constant'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(2678) : error C2143: syntax error : missing ';' before 'constant'
c:\program files\microsoft visual studio 8\vc\platformsdk\include\msxml.h(2678) : error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio 8\VC\include\gl/gl.h(1499) : error C2143: syntax error : missing ')' before 'constant'
C:\Program Files\Microsoft Visual Studio 8\VC\include\gl/gl.h(1499) : error C2143: syntax error : missing ';' before 'constant'
C:\Program Files\Microsoft Visual Studio 8\VC\include\gl/gl.h(1499) : error C2059: syntax error : ')'

www.lefthandinteractive.net
Advertisement
My first guess would be a preprocessor issue. What exactly is the constant mentioned in the errors? My guess is that a preprocessor macro has an incorrect value...
My first guess is that the order of the directories in your VC++ include list is different now than it was the first time. Or some items may not have even been added to it (perhaps you installed an SDK before that set itself up, and now you have to either reinstall it or manually set it up).

General rule, the directory with the newest files must be top in the list.
Hmm, well I was able to exclude "msxml.h" from the compilation process by defining "WIN32_LEAN_AND_MEAN". What I'm left with now are the errors pertaining to "gl.h". Where would I be able to find a somewhat recent "gl.h" file. I googled around but I was only able to find a Mesa3d version which the compiler complains about due to some defines in the file.

Nevermind. One of the functions in gl.h has a parameter "pi" which is conflicting with a "pi" that I defined in my code. Moving my define to the bottom of the file fixed things.
www.lefthandinteractive.net
You don't find a more recent one.

#include
#include

In that order or you get those errors.

Is this Visual Studios 2005 Express Edition? There is a HUGE difference between Standard (what you listed) and the EE version too. You need to manually install the Platform SDK with EE where as it's done in Standard.

This topic is closed to new replies.

Advertisement