Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Problems with linking

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2003
    Location
    Denmark
    Posts
    2

    Problems with linking

    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

    Cheers
    Mark

  2. #2
    Junior Member Newbie
    Join Date
    Dec 2003
    Location
    Denmark
    Posts
    2

    Re: Problems with linking

    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.

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2003
    Posts
    19

    Re: Problems with linking

    You getting this messages bebause of no actually LIB files linked to Your program. Which version of MS VC++ You are using?

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Problems with linking

    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_boa...ML/014848.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •