Sign in to follow this  
codeman_nz

OpenGL Help with Glut in Dev-C++

Recommended Posts

I am losing my mind here.  I just downloaded the glut devpak and created a new project using the glut template but I get errors like this:

[Linker Error] undefined reference to `_imp____glutInitWithExit@12'

 

I know this is linker error and I need to link the glut library but I have already done that like this:

-lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32

 

But I still get that error and I have no idea how to fix it.

Share this post


Link to post
Share on other sites

Are you using the original Bloodshed Dev-C++ (strongly not recommended -- it's horribly out of date and buggy), or are you using one of the updated versions (Orwell Dev-C++ or wxDev-C++ -- of the two I would recommend Orwell Dev-C++)?  What version of Windows are you using?

 

...and where did you get the devpak from?  Is it up-to-date?

Share this post


Link to post
Share on other sites
If the linker only complains about the WithExit-functions, then it is probably the "atexit-hack". You can disable it with #define GLUT_DISABLE_ATEXIT_HACK before including the GLUT header.

Share this post


Link to post
Share on other sites

Yes I downloaded into the dev c++ folder.

 

I am using wxDev-c++ running on windows 7

 

I downloaded the devpak from the devpak website and I think it is up to date.

 

No that is not the only one.  It is coming back with a whole lot of errors.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this