Jump to content
  • Advertisement
Sign in to follow this  
jon723

OpenGL Awkward compilation issues

This topic is 4114 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

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 : ')'

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

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!