DevC++ Linker Errors

Started by
5 comments, last by orcblood 20 years, 3 months ago
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!
Advertisement
You are linking to the opengl libraries, right? I.e. you''ve got -lopengl32 in your project setup.

[teamonkey]
[teamonkey] [blog] [tinyminions]
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
______________________________________________________________
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
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.
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?
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]
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
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!

This topic is closed to new replies.

Advertisement