I am trying to load some .dds textures for my game.
My IDE is Dev-C++ with GLUT 7.6 installed.
When I use OpenGL functions like glTexImage2D() or glVertex2f() my programs compile normally but when I try any of the glCompressedTexImage functions the linker tells me that there’s an undefined reference to it.
like that: [Linker error] undefined reference to `glCompressedTexImage2D@32′.
I am linking my project only with libopengl32.a, and I am using Win API for the window.
Does I need to add another library in the linker options or my OpenGL version is too old ?
I am trying to load some .dds textures for my game. My IDE is
Share
On windows platform opengl32.lib provides functions only for a very old GL version (1.1 or something like that). If you want functionality from newer OpenGL version, then you should get pointers to missing functions using wglGetProcAddress.
However, this is too much hassle. So instead of that you can use OpenGL extension library (GLEW or GLEE) to get missing function addresses for you. It is a better idea to use GLEW instead of GLEE, since GLEE looks abandoned.