PDA

View Full Version : OpenGL Wrapper for Windows - Link Error



Jaise
04-14-2011, 09:42 PM
I have been working for a wrapper under windows for OpenGL. However, there is are link errors I have been working on for a while and still can't figure it out. They pertain to LNK2019 (unknown symbols) of many of my functions. Any help, suggestions, or improvements are welcome. Thanks, community.

mobeen
04-15-2011, 01:22 AM
You are missing the two linker libs opengl32.lib and glu32.lib
Solutions: two
1)Do it manually in the compiler settings (varies for different ides)
In visual studio, go to Project menu->Properties->config. properties->linker->input and then add opengl32.lib and glu32.lib
2) programmatically add a pragma in the main cpp file like this, (this is also visual studio only I dont know if it works in other compilers (i doubt it will)


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


See if this helps.

Jaise
04-16-2011, 01:22 AM
yes, thank you. i had the improper include lib