View Full Version : Back to begginers!
04-06-2006, 10:56 AM
I am a VB programmer switchwing to C++ and I feel like a baby now!
I downloaded a Nehe example and it just won't work.
LINK : fatal error LNK1104: cannot open file "glut32.lib"
Error executing link.exe."
I already download the glut 3.7 and copied the .dll's and everywhere (system32, include folder). Also copied the .lib to the include folder.
Can someone help me with the basics?!
What if just don't want to use GLUT and i just want to use OpenGL, what headers should I use?
This has been asked billions of times. The error you have makes me think that you copied the lib in the wrong directory or didn't ensure it is accessible threw the library directories.
If you want just to use OpenGL, then good luck ! Well more seriously, you need the native windows library. But I'll suggest you to stay with glut or use something else like SDL.
04-06-2006, 12:09 PM
>> Also copied the .lib to the include folder.
libs goes to lib directories...
04-06-2006, 03:48 PM
GLUT opens a window gives you a 3D context, handles event input like window manager, keyboard and mouse.
If you don't use GLUT then what you use will vary depending on your platform. e.g. on windows you'll use win32 and WGL calls.
GLUT saves you a lot of work, especially when you're just starting out.
Joe the Programmer
04-06-2006, 06:36 PM
Make sure that your library and search paths are set up properly in the compiler. In Visual C++, it's in the options dialog somewhere.
Hope this helps
04-06-2006, 08:56 PM
Guys thanks for all your answers!
Yes... I know that GLUT is extremelly useful!... I just thought that without it, it would be easier to make the libraries stuff to work... But I get similar errors still without it:
"LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Lesson5.exe : fatal error LNK1120: 21 unresolved externals
Error executing link.exe."
What is exactly waht I have to do to fix this?
I am working under Microsoft C++ enveiroment.
Thanks everyone! :)
Go back to glut until you learn more about C/C++, linkers and Windows library. That's the best thing you have to do: What we all told you was intended to help you, and we'll all feel sad if you don't follow up our advises.
04-07-2006, 07:42 PM
IT WORKED!!!! :)
The main problem was that I was not creating a win32 project and had downloaded nehe examples that were not win32. So when I loaded then on Microsoft C++, the debugger searched for the Main Sub and since it didn't find it it gave that error.
I placed the .lib's in the lib folder and now everything works like a charm!
Thanks to everyone!
Jide: I think you missed understanded me or I didn't explain myself right. Everyone's advices are great, and I find GLUT very useful. It's just that my main code is in Visual Basic, and will be just using C++ to compile a DLL to use with Visual Basic for using functions that VB does not support (such as Extensions). That's why I thought that if needed only extension handling then I would only need GLEW or GLEE, but not GLUT.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.