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 5 of 5

Thread: Linker issues

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2010
    Posts
    5

    Linker issues

    An Enigma is before me.

    I am getting 31 typical linker message in Visual C++ (express):
    1>main.obj : error LNK2019: unresolved external symbol _glEnd referenced in function "void __cdecl drawCube(void)" (?drawCube@@YAXXZ)

    This is a program I have compiled before with a different compiler. I have taken care to add opengl32.lib glu32.lib and glut32.lib as "additional dependencies." I have also verified that it is finding the lib files (located in prog files/MS SDK/Windows/v6.../lib

    I have also done a dumpbin on the lib files to be sure the symbols are exported there.

    What is the problem here?!

  2. #2
    Junior Member Newbie
    Join Date
    Dec 2009
    Location
    Princeton, NJ
    Posts
    19

    Re: Linker issues

    Did you #include "windows.h"?

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2010
    Posts
    5

    Re: Linker issues

    Yes I did (before opengl related headers)

  4. #4
    Junior Member Regular Contributor
    Join Date
    Aug 2009
    Posts
    126

    Re: Linker issues

    Sure that he links opengl32.lib ?

    For example with Visual C++ 2008:
    Code :
    #pragma comment(lib,opengl32.lib)


    ^^


  5. #5
    Junior Member Newbie
    Join Date
    Feb 2010
    Posts
    5

    Re: Linker issues

    I don't believe you have to add the #pragma line if you have added the library in the linker options. Even so, I tried that and still have the exact same problem (plus you forgot the quotes around the library name). I did it for opengl32.lib, glu32.lib, and glut32.lib.

    Any other ideas?

Posting Permissions

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