Skip to main content
gamedev.net
🔒 Locked

Awkward compilation issues

Started by jon723 Mar 18, 2007 at 4:49 PM 3 replies 5.5k views
Original Post
jon723
jon723
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
ToohrVyk
ToohrVyk
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...
Xai
Xai
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.
jon723
jon723
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.