Dev C++ with OpenGL ... Strange errors...

Started by
3 comments, last by MetalDream 19 years, 1 month ago
I have a WinGDI based OpenGL program that will not compile with Dev C++. There are no errors in the code, but Linker Error messages pop up whenever I try to compile it. All of these errors are related to OpenGL commads (i.e. wglCreateContext, glColor, glVertex3f, etc.) example:

[Linker Error] Undefined Reference to wglCreateContext@4
or... something like that
Advertisement
Are you linking with opengl? Try adding -lopengl32 to the linker options.
.....
Quote:Original post by Kojo
I have a WinGDI based OpenGL program that will not compile with Dev C++. There are no errors in the code, but Linker Error messages pop up whenever I try to compile it. All of these errors are related to OpenGL commads (i.e. wglCreateContext, glColor, glVertex3f, etc.)

example:

[Linker Error] Undefined Reference to wglCreateContext@4


or... something like that
ghghjg jkgkh hkh
hjrc tyr56bgysvnhas
Try going to project > project options > parameters, click "add library or object". There find the libraries that contain the functions you called (in the project I'm looking at, a first GL program [rolleyes], they're libglu32.a and libopengl32.a, but you might need more), select them and click open. When you're done with all this, compile and it should link the GL stuff.

This topic is closed to new replies.

Advertisement