PDA

View Full Version : glut.h



11-14-2002, 11:25 AM
That's the error I got,seems like glut.h is not included but I checked and it is there.
Can't see where is the problem


--------------------Configuration: cube - Win32 Debug--------------------
Linking...
cube.obj : error LNK2001: unresolved external symbol ___glutInitWithExit@12
cube.obj : error LNK2001: unresolved external symbol ___glutCreateWindowWithExit@8
Debug/cube.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

cube.exe - 3 error(s), 0 warning(s)

yakuza
11-14-2002, 11:28 AM
What you've got there is a link error, you need to make sure you've linked to glut32.lib in your project settings if you're using Visual C++.

11-14-2002, 11:35 AM
I've done that but still not working and that is the problem...actually I can't see where the problem is.
This is how it looks on my computer

File Location

gl.h
glut.h
glu.h [compiler]\include\gl


Opengl32.lib
glut32.lib
glu32.lib [compiler]\lib


Opengl32.dll
glut32.dll
glu32.dll [system]

yakuza
11-14-2002, 11:44 AM
I'm not very familiar with Glut, but those "WithExit" look kinda funny, and a google search turns up almost no results. Are you following a tutorial for this?

11-14-2002, 11:51 AM
I am but no results... it might be something wrong with glut library??

Stack Overflow
11-14-2002, 11:57 AM
Your glut.h may be an older version. Another problem is that you may not have 'glut32.dll'. You can download all glut files, including glut32.lib, glut.h, and glut32.dll, "glut-3.7.6-bin.zip" at: http://www.xmission.com/~nate/glut.html

11-14-2002, 12:27 PM
I did this but still no result,...getting a bit desperate

Stack Overflow
11-14-2002, 12:32 PM
Did you read the readme in the zip and follow the instructions on where to extract the files. If so, when you extract the files, I found out that it makes a folder called "glut-3.7.6-bin" in the folder where you extracted them, which means it did not write over your old existing files. So you will need to go to the designated folder where you extracted the files, go in Nates folder, and copy the file to the correct folder. -Good Luck

nexusone
11-14-2002, 12:50 PM
The order is important:

#include<windows.h>// try adding this
#include<GL/gl.h>
#include<GL/glu.h>
#include<GL/glut.h>



Originally posted by Levy74:
I've done that but still not working and that is the problem...actually I can't see where the problem is.
This is how it looks on my computer

File Location

gl.h
glut.h
glu.h [compiler]\include\gl


Opengl32.lib
glut32.lib
glu32.lib [compiler]\lib


Opengl32.dll
glut32.dll
glu32.dll [system]

Deiussum
11-15-2002, 04:27 AM
Sounds like this could be a job for

#define GLUT_DISABLE_ATEXIT_HACK

Add that before you #include glut.h. I think that's the right #define, anyway.