Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

CheeseMonger

OpenGL Multiple file OpenGL Project

This topic is 6019 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 wanted to put all of my OpenGL rendering code into a seperate file, and into a seperate class called cOutput. My WinMain() and message procedure is in winmain.cpp. I also have a header file called cOutput.h that contains the declarations for cOutput, and the definitions are in cOutput.cpp. gl/gl.h and gl/glu.h are included in cOutput.h and so get included in all the files. It will compile and build fine with ONLY the winmain.cpp file, but if I try to compile them all, I get this compiler error: --------------------Configuration: 3D Reel Test Project - Win32 Debug-------------------- Compiling... winmain.cpp cOutput.cpp c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2144: syntax error : missing '';'' before type ''void'' c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : error C2501: ''WINGDIAPI'' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\gl\gl.h(1152) : fatal error C1004: unexpected end of file found Error executing cl.exe. 3D Reel Test Project.exe - 3 error(s), 0 warning(s) What do I do if there''s an error in the gl headers? Cheers.

Share this post


Link to post
Share on other sites
Advertisement
Screwed that up. Try switching the order of the includes for cOuptut.h and gl\gl.h.

[edited by - LilBudyWizer on June 25, 2002 6:24:35 PM]

Share this post


Link to post
Share on other sites
Well there''s probably not a problem in the headers, the problem is probalby in cOutput.cpp, you probaly forgot a ; there, and the error just carried into the next file.

Share this post


Link to post
Share on other sites
Did you include windows.h BEFORE you included the gl headers in cOutput.h? You have to do this in a windows app.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!