using sdl & opengl in kdevelop on linux

Started by
0 comments, last by deathkrush 17 years, 6 months ago
hello all. i'm currently using KDevelop in linux. i'm trying to compile a program which uses sdl and opengl but i get some errors and i have no idea why (mybe i forgot to link somthing?) here are the errors:

ad.o: In function `LoadGLTextures()':/home/yhonatan/ad/src/ad.cpp:161: undefined reference to `gluBuild2DMipmaps'
ad.o: In function `resizeWindow(int, int)':/home/yhonatan/ad/src/ad.cpp:191: undefined reference to `gluPerspective'

and here are my includes:

#include <stdio.h>
#include <stdlib.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "SDL.h"


and this is what i give to the linker:

-lSDL -L/usr/lib -lGL -L/usr/include/GL

what am i doing wrong? or what should i add? thanks in advance.
Advertisement
Add -lGLU to the linker.
deathkrushPS3/Xbox360 Graphics Programmer, Mass Media.Completed Projects: Stuntman Ignition (PS3), Saints Row 2 (PS3), Darksiders(PS3, 360)

This topic is closed to new replies.

Advertisement