View Full Version : compiling example from Kilgard

01-22-2001, 07:26 PM
I'm trying to work through the first chapter of Kilgard's OpenGL for X book and I'm having problems getting the glxsimple example on page 31 to compile. The command I'm using (from the book) is:

gcc -o glxsimple glxsimple.c -lGL -lXext -lX11

and the error is:

/usr/bin/ld: cannot find -lXext
collect2: ld returned 1 exit status

I saw this somewhere else on the web, and that page suggested the same command sans "-lXext", which I tried, but received the same error with "-lX11". I'm running Debian unstable and I've got the xlibs-dev package installed. I'm sure I'm missing something obvious, but I haven't done much with this stuff so I'm going crazy trying to figure out what. Any suggestions? (RTFM is fine with me, just tell me which one...)

01-24-2001, 02:16 AM
just add -L/usr/X11/lib or whereever your
X11-libraries lie

01-24-2001, 09:30 AM
Duh. Damn, I knew it was going to be something stupid like that. Thanks!