I had just installed glut-3.7.6-src.zip, copied all the relevant files to their locations, opened the test project, compiled, and got the following :
bigtest.obj : error LNK2001: unresolved external symbol ___glutInitWithExit@12
bigtest.obj : error LNK2001: unresolved external symbol ___glutCreateMenuWithExit@8
bigtest.obj : error LNK2001: unresolved external symbol ___glutCreateWindowWithExit@8
Debug/bigtest.exe : fatal error LNK1120: 3 unresolved externals
what did I miss? the dll is in place, the glut32.lib is in C:\Program Files\Microsoft Visual Studio\VC98\Lib, the glut.h is in C:\Program Files\Microsoft Visual Studio\VC98\Include\GL, is there more to do???
any help will be appreciated!
Link glut32.lib in your project settings.
I also have these errors.
I have linked all the gl libraries to my project.
I’ve been having the same sort of problem except that mine says "error: unresolved external ‘glutInit’ referenced from module j.c and “warning: j.c 42: undefined structrure ‘GLUnurbs’” it says the same thing three times with different structures. the other two are GLUquadric and GLUtesselator. it seems like my borland compiler won’t accept the libraries I try to link. it seems to be the same sort of problem you’re having. if you guys have any luck please tell me. email@example.com .
You have to go to project/settings, and in the link tab put glut32.lib in the library moduels, (and perhaps glui32.lib etc). The funny thing about this, is when I did this on Win2000 it worked, now I have upgraded my machine to winXP, and I can’t get it to compile anymore! I am getting the same error that you are getting… any help??? Have I forgotten something?
K, I figured it out, you also have to include the following in the library includes (as above) project, settings, link, add glut32.lib, glu32.lib, and opengl32.lib, then my file compiled, hope this helps you.
i also faced the same problem but mine happenend after i uninstalled Visual C ++ 6.0 on my pc, and install it back
with the same version. the difference now is that i am running on window XP, before this with window ME, there is no problem running the program . I don’t think it is the cause off the link lib problem in the project>> setting, because the error message is still the same
Surprise! Your compiler doesn’t magically know which libraries you need. If it were to scan all libraries in the lib directory, it would take about 10 minutes to compile a simple app.
Borland and MSVC++ use the same extension for code libraries, .lib, so you have to know which compiler the library is for. It might also have to be the right version, but I’m not sure, because I use MinGW (www.mingw.org).
In general, most glut projects require you to include glut32.lib, glu32.lib, opengl32.lib, gdi32.lib (if you’re building a console app), and winmm.lib (if you’re using the standard Windows joystick functions). If you get “unresolved external” type errors, search your Windows help documentation for the function name (if it’s a Windows API function) to find out which library it is in. Also, with some compilers (e.g., GCC), the order you include some of the libraries matters. Borland lets you link libraries with a #pragma statement (often in the header files). Don’t do this. It’s just wrong.