Jump to content
  • Advertisement

Archived

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

orcblood

DevC++ Linker Errors

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

Ok, so whenever I try to compile my simple little game in DevC++ I get erors for the linker. Im currently trying to add texture maping to a little cube - like in lesson 6. Ive written out the code and even copied/pasted the code thinking that I was at fault and yet the errors still persist... Would anyone know how to remove these errors? Below is a link to a text file with the errors in them... It seems that DevC++ doesnt like some functions called by the NeHe tutorials but I dont really understand why that is... Arent the OpenGL functions all the same? http://www.orcish-design.net/compilelog.txt Thanks for any help! Its such an annoying problem!

Share this post


Link to post
Share on other sites
Advertisement
You need to link to glu32.lib and opengl32.lib. An easy way to do so is to add:

#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")

near the top of your "main" source file. I''m not 100% sure if that''ll work in Dev-C++, but it probably will.

Also, I know that I get similar errors if I include the gl files before windows.h.

______________________________________________________________
The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ
MySite
______________________________________________________________

Share this post


Link to post
Share on other sites
Ahha! Thanks guys, though now it tells me that

c:\windows\desktop\games\legend of korlisia\launcher.o(.text+0x56):launcher.cpp: undefined reference to `auxDIBImageLoadA@4''

But prehaps thats because Im still not linking something properly.

Share this post


Link to post
Share on other sites
Ok, never mind on that last note. Theres one problem now - it compiles - but it says Im missing the glaux.dll... And then it ends in an unknown error. Would I hande this the same way as before? With the #pragma once and the linker options?

Share this post


Link to post
Share on other sites
glaux is an obselete library for doing a few simple things in OpenGL. Try searching for glaux.dll on the net. If you find it, just put it in the same folder as your executable. Failing that, look at NeHe's code for loading targa files (it's in the late 20's or early 30's in his tutorials) and try to adapt it to your loading code.

I just found glaux.dll for you.

______________________________________________________________
The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ
MySite
______________________________________________________________


[edited by - Thunder_Hawk on January 11, 2004 11:47:50 AM]

Share this post


Link to post
Share on other sites
Ah yes thank you so very much! Ya know, compaired to other forums on the net Ive found that GameDev is by far the greatest and friendly community! Now, just to get the bitmaps to load. Anyways, thanks so much for all the help!

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!