Jump to content
  • Advertisement
Sign in to follow this  
yanuart

OpenGL Trouble including gl/glu.h

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

Hi, I kinda new in using OpenGl, I'm trying to include glu.h by simply doing this : #include <gl/glu.h> it seems fine, as I saw other project doing this and it compiled correctly but when I got to do this I always get like 100s of errors. mostly this error : "e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\gl\GL.h(1152): error C2501: 'WINGDIAPI' : missing storage-class or type specifiers" can somebody tell me what to do ? I'm using VC .net, is there anything that my VC/proj settings I have to change ? How come other projects compiled correctly (on the same VC) ?

Share this post


Link to post
Share on other sites
Advertisement
thanks ;) that solved the problem but now comes another problem..
I got all this unresolved external symbol error like this when linking/building the project :
"engine1 error LNK2019: unresolved external symbol _gluNewTess@0 referenced in function "public: void __thiscall CPolygon::Tesselate(void)" (?Tesselate@CPolygon@@QAEXXZ)"

now I know this maybe because I forget to include some lib, but I've done that in my project settings, I've allready add glut.lib and glut32.lib to my project linker settings.

Are there any settings that I must add/change ??

Share this post


Link to post
Share on other sites
I think you need to link in opengl32.lib and glu32.lib -

#pragma comment(lib,"glu32.lib")
#pragma comment(lib,"opengl32.lib")


Also I do not think there is a "glut.lib" file, so if it says it cannot be found, then remove it. The correct one is as you have, glut32.lib. Here is the reference for that.

- Drew

Share this post


Link to post
Share on other sites
dont pragma comment your libs, not all compilers interpret #pragma the same way, instead use the project options so you dont run into trouble

hope that helps
-Dan

Share this post


Link to post
Share on other sites
Quote:
Original post by Drew_Benton
I think you need to link in opengl32.lib and glu32.lib -

#pragma comment(lib,"glu32.lib")
#pragma comment(lib,"opengl32.lib")


Also I do not think there is a "glut.lib" file, so if it says it cannot be found, then remove it. The correct one is as you have, glut32.lib. Here is the reference for that.

- Drew


add those two libs to your project with add exisiting item under the project menu

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!