View Full Version : Linked Error (Help a Begginer)

08-01-2011, 10:44 AM
Hey evebody, its my first post here, so please take my doubts away...
When I run my program it doesn`t run and the compiler tells me..

[linked error] undefined reference to `gluPerspective@32`
id returned 1 exit status
[Build Error]["First]Error 1

When I take out the line gluPerspective(...) the program runs nicely, but I cant move the z axis... How do i fix this???

and my opengl doesnt has glaux.h, and the tutorials that i am following use this lib to load textures...what can i do??
I couldnt find some way to fix...

Please help me with this questions...

08-02-2011, 01:52 AM
Seems like linking issue. check if you have include lib file required for gluPrespective i.e GLU lib file (in case of windows, GLU32.lib).

08-02-2011, 10:12 AM
I already discover the first problem...
I dont put in the linker the parameter -lglu32...nice

But my second doubt continues...how do i load images to use as textures?? I tried 2 codes but my compiler get erros on them... There is a simple way to load images?? The rest i know how to do it, to make the image a texture to use.. My problem is how to load the images and transform in a file that the open gl accepts...

08-02-2011, 05:33 PM
Try one of Image Loading libs:

I like DevIL, but this is my personal preference.