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

Thread: Error LNK 2001: unresolved external symbol

  1. #1
    Guest

    Error LNK 2001: unresolved external symbol

    Hello, guys !
    I tried to port an OpenGL application from Unix to Windows. I added to the libraries glut32.lib, I included glut.h but all the function from "glut" referenced in the program are declared unresolved external symbol (Error LNK2001) when linking.
    So, where is the error ?

  2. #2
    Intern Newbie
    Join Date
    Aug 2001
    Location
    Germany
    Posts
    47

    Re: Error LNK 2001: unresolved external symbol

    Hi Ground

    please post your CODE !!!!!

  3. #3
    Guest

    Re: Error LNK 2001: unresolved external symbol

    [QUOTE]Originally posted by GroundZero:
    I sended the code to ByteZero by E-mail. So, anyone have another sugestion ?

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: Error LNK 2001: unresolved external symbol

    Since it's a linking error, there shouldn't be any problem with the code.

    Are you sure you have opengl32.lib and glut32.lib in your compilers lib-directory?

  5. #5
    Guest

    Re: Error LNK 2001: unresolved external symbol

    Originally posted by Bob:

    Are you sure you have opengl32.lib and glut32.lib in your compilers lib-directory?[/B]
    Yes, they are there, I checked that
    opengl32.lib, glu32.lib, glut32.lib are in LIB
    and I add also glut.h in Include\GL\, just in case ...
    I tried all the stuff recomended for this type of error in the Help ...
    Sorry to bother you with such a simple question ...

  6. #6
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    3,115

    Re: Error LNK 2001: unresolved external symbol

    You haven't told us the exact error message yet. What does it say more than "... unresolved external..."? It must say what symbol it did not found.

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,757

    Re: Error LNK 2001: unresolved external symbol

    Sounds like a possible header-lib mismatch. That is, using a header of one version of glut, but using a lib from a different version of glut. If you have more than one glut32.lib, make sure the one you want to use has the highest precedence.

  8. #8
    Guest

    Re: Error LNK 2001: unresolved external symbol

    Originally posted by DFrey:
    Sounds like a possible header-lib mismatch. That is, using a header of one version of glut, but using a lib from a different version of glut. If you have more than one glut32.lib, make sure the one you want to use has the highest precedence.
    it was exactly this, thanks ! I was using glut.h from one old version of the code and a new glut32.lib ; Now is working ! OK, now back to work !

Posting Permissions

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