PDA

View Full Version : Error LNK 2001: unresolved external symbol



09-19-2001, 02:02 AM
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 ?

ByteZero
09-19-2001, 02:04 AM
Hi Ground

please post your CODE !!!!!

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

Bob
09-19-2001, 02:29 AM
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?

09-19-2001, 02:34 AM
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 ...

Bob
09-19-2001, 03:09 AM
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.

DFrey
09-19-2001, 05:49 AM
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.

09-19-2001, 05:36 PM
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 !