Jump to content
  • Advertisement
Sign in to follow this  
Jeef4h

OpenGL Cannot find -lGLU (codeblocks linker problem)

This topic is 2597 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

Hi there people!

If got a quick (and simple question probably).
I recently bought the "beginning opengl game programming" boek and downloaded the corrected source files.
However, i can't compile the app. (The code isn't relevant for my problem.)
When ever I try to build the project I get the following error:
" ld.exe || cannot find -lGLU ||=== Build finished: 1 errors, 0 warnings ===|"

Now I've allready googled around a bit and found out it's probably a linker problem.
I added libOpenGL32.a and libGlu32.a to the linker settings of the project.
Thought this would solve the problem.... but apparently not!
I guess I overlooked something but I'm relatively new to programming so can't figure it out on my own :(.

Can someone aid me in my problem? :)
Thnx in advance!

(ps running the latest codeblocks on windows 7)

Share this post


Link to post
Share on other sites
Advertisement
It's trying to find a library called libGLU.a, which doesn't exist. In linker settings, remove the line that tells it to link to GLU and replace it with glu32 instead. Adding libglu32.a will help, but if the old -lGLU is still in there, the linker will still choke trying to find it.

Share this post


Link to post
Share on other sites

It's trying to find a library called libGLU.a, which doesn't exist. In linker settings, remove the line that tells it to link to GLU and replace it with glu32 instead. Adding libglu32.a will help, but if the old -lGLU is still in there, the linker will still choke trying to find it.


O lol, yes, you are right.. that's actually pretty logical.
I was to focussed to see this simple solution I guess.
I deleted all the old linked libaries in the project preferences and added all required new ones.
Anyway, thanks a million, it finally works!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!