Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Fredric

OpenGL Newbie OpenGL Question- using GLUT

This topic is 6803 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do I link glut to my application? To link Opengl, I simply put OpenGL32.lib , but how do I link it to GLUT? Programming::~Fredric(const Annoy_Ance)

Share this post


Link to post
Share on other sites
Advertisement
You need to link agains glut32.lib in Windows. (And have glut32.dll as well.) If you don''t have it chances are you need to download it off the SGI site.

Share this post


Link to post
Share on other sites
Aw cripes... I guess I don''t have it! :p where can I download it?!

Programming::~Fredric(const Annoy_Ance)

Share this post


Link to post
Share on other sites
Yay, I downloaded the files necessary, and put glut.lib, glut.dll, glut32lib, and glut32.dll in the lib section of my VC++ 6.0 files. However, I keep getting 2 errors when I try to build my project. How do I link a dll? I reckon that''s my problem...

Programming::~Fredric(const Annoy_Ance)

Share this post


Link to post
Share on other sites
It might help if you mentioned the two errors. But generally you need to explicitly specify the glut32.lib as a library to be linked in your link step. In Visual C++ it''s part of project properties under linker.

Share this post


Link to post
Share on other sites
Yah, I already linked the glut32.lib, but how do I link the .dll seeing as you said that I need to include the dll as well?

Programming::~Fredric(const Annoy_Ance)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Just stick the dlls into the same directory as the executable.

Share this post


Link to post
Share on other sites
Linking against the dll is done at run-time by the OS (hence the term dynamic link library). You just need to put the dll where the OS can find it. The same directory as the executable will work and so will the windows\system directory. There are a couple of other places that the OS will search too, but I can''t remember them off the top of my head.

Share this post


Link to post
Share on other sites
Okay, here is where I stand:
I put the glut32.dll in the exact same place as where my .exe would be, but I get the following message:

LINK : fatal error LNK1104: cannot open file "glut32.dll"
Error executing link.exe.

The same place where I stuck opengl32.lib and glut32.lib, I have the glut32.dll (the linker), but I''m still having problems. Can anyone help me even more? I''m new to OpenGL- pity me!

Programming::~Fredric(const Annoy_Ance)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!