View Full Version : Problems with linking

12-22-2003, 04:12 AM
Hi NG.

I am a newbie on the window platform. I have some OpenGL programs that i want to compile under win2k.

I am using mingw and the Dev C++ IDE. I have succesfully compiled and linked some small toy programs by using -lglut32 -lglu32 -lopengl32.

I now have a problem with a somewhat more advanced piece of code that uses som nvidia extensions. The problem is that i get unresolved references.

I have tried to link with the nvoglnt.dll by using -lnvoglnt but that does not seem to do the trick. Right now my line of thougt is that i should try to use the impdef.exe tool on nvoglnt.dll to get a .def file so that i later can make a .a file by using dlltool.exe.

Somehow, this seems complicated and i have a feeling that this might not be the correct approach. Should linking by

-lglut32 -lglu32 -lopengl32.

work even when using vendor extensions? And if yes, how does it work? I mean the vendor information must surely be hidden in i.e. nvoglnt.dll for nvidia supplied extensions.

Hope to get some comments or links


12-22-2003, 01:05 PM
My problem was unresolved references of the type _imp__ for all my OpenGL calls.

As it turns out, the problem was that the code did not include gl.h. Instead it included glut.h which is supposed to include gl.h - or so i thought. In linux i works fine, but in windows I have to specifically include gl.h.

I think i remember someone telling me that it was best to let glut.h include gl.h - was i the documentation? yes it was!

See GLUT API version 3 section 1.5 Conventions (second half).

Anyway, the conclusion might be that unresolved references of the type _imp__ could be due to header issues.

01-08-2004, 01:16 AM
You getting this messages bebause of no actually LIB files linked to Your program. Which version of MS VC++ You are using?

01-09-2004, 05:33 PM
As you may not know, under windows, the opengl32.dll does NOT have any extention entry point. To solve this, see : http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/014848.html