PDA

View Full Version : Compiling Opengl source


Littleman
12-11-02, 02:59 PM
Hi there,
I succesfully installed the nvidia drivers on my dell inspiron 8200...no real problems, which actually surprised me :p
Now, of course i want to go further and compile things...
My first attempts where with Nehe's opengl tutorials...
Unsuccessful, because apparently the complier could not find some GL headers...
After reading the Docs from Nvidia (hehe i never read them BEFORE anything goes wrong) i found that i had nothing in my usr/include/GL directory, so i put nvidia's headers in there

now, "lesson01.c:14:20: GL/glx.h: No such file or directory
lesson01.c:15:19: GL/gl.h: No such file or directory
lesson01.c:16:20: GL/glu.h: No such file or directory"

have disappeared from compilation but i still get :

lesson01.c:17:38: X11/extensions/xf86vmode.h: No such file or directory
lesson01.c:18:24: X11/keysym.h: No such file or directory

errr where do i find that ??? Thank you for your replies and i hope that's the only thing i have to do to compile simple stuff... :)

mtrr
12-11-02, 03:35 PM
what about installing the development packages from
your friendly distributor? xlibs-devel, or xdevel, xfree86
devel or something like that.


cheers

Littleman
12-11-02, 03:43 PM
Good idea :p that's what i did 5 minutes after this post :)
err now i've got a whole bunch of new errors, and of course i don't understand anything about them:confused:

Littleman
12-11-02, 03:54 PM
Ok, apparently, with those X headers, i installed SDL stuff too...
So i downloaded the tutorial called lesson01-sdl code
And i get only ONE mystake now, when i try to 'MAKE' :

gcc -Wall -ansi lesson01.c -o lesson01 -lGL -lGLU `sdl-config --cflags --libs`
/usr/bin/ld: cannot find -lGL

does it ring a bell ?

mtrr
12-11-02, 04:09 PM
gcc -Wall -ansi lesson01.c -o lesson01 -L/usr/X11R6/lib -lGL -lGLU `sdl-config --cflags --libs` ?

could be....

cheers

Littleman
12-13-02, 05:47 PM
same error, and i checked in my usr/X11R6/lib directory, and i have GL libs in there...........

mtrr
12-14-02, 05:36 AM
are you trying to compile the glx, or the gl lesson?

both are working for me ...

btw: on my system GLU is in /usr/X11R6/lib, and
GL sits in /usr/lib



cheers

bwkaz
12-14-02, 07:30 AM
What does find /usr -name libGL.so tell you?

Does it help to specify GLU and GL in reverse order, i.e. -lGLU -lGL? Since GLU depends on GL, this is the order that they are required to be in, but I don't know if that will fix your problem or not...

Littleman
12-14-02, 11:19 AM
The find commmand gave me :

/usr/lib/libGL.so
/usr/X11R6/lib/libGL.so

Are those the same libraries ? Or one is for the X system ??? Are they in the right place ? Is it gonna snow for christmas ??? :D

Reversing the GLU and GL order does not change anything apparently...

What would help maybe, would be to tell me what the GLU lib name is and where it should be, if it needs to be in a specific path etc.

I typed ldconfig once, checked the path in /etc/ld/so/conf -- Same error

I installed SDL's latest GLU lib...same error

Here is a full paste :

make
gcc -Wall -ansi lesson01.c -o lesson01 -lGLU -lGL `sdl-config --cflags --libs`
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
make: *** [all] Error 1

dum de dum, i can fell that i'm not far from compiling...and yet so far :)

Littleman
12-14-02, 12:18 PM
Who's the man ? who's the man ? errr Littleman ?
YEEEAHHHHHH !!!

After reading the nvidia kernel and GLX README veeeeeeery carefully this time, they do say that most problems come from conflicts in libs, linux and ld thinking they are using the right lib, while they are not. The point is : i only had to download the latest kernel and glx sources from nvidia. Compiling the source was a good way to put the right libs in the right place ;)

So now i can compile that Nehe tutorial, AND i have theh latest Nvidia driver running :p

Thx for your help everybody.:cool: