[Gllug] library includes and compiling

Jonathan Dye jonathan.dye at automationpartnership.com
Thu Jan 10 10:29:16 UTC 2002


At 00:22 10/01/02 +0000, you wrote:
>On Tue, 08 Jan 2002, Jonathan Dye spake:
>> I'm trying to compile against the OpenGL libraries in /usr/X11R6/lib by
doing
>> 
>> gcc source.c -lGL
>
>yuck. ITYM
>
>gcc -O2 -Wall -ansi -pedantic -o source source.c -L/usr/X11R6/lib -lGL
>
>if, that is, you want good warnings and so forth... GCC generates truly
>*appalling* code at -O0, and in GCC<=2.9x, some warnings are only
>emitted at -O1 and above (because flow analysis isn't done at -O0).

Which is why my actual makefile includes practically the same line as you 
suggest.  I was leaving out the stuff that wasn't relevant to the question.

>(except that you'll almost certainly need at least -lGL -lX11, and you
>may well need -lICE and -lXext as well. Oh, and don't forget to consider
>MesaGL <=3.2 as well, which called the library -lMesaGL instead... the
>death of portability by a thousand cuts...)

I don't seem to need anything other than -lGL -lGLU -lglut -lm to do what I
want.  
I want to compile against GL libraries not specifically MesaGL libraries so
I'm using -lGL.  It might be run on a machine with different GL libraries?

JD



_____________________________________________________________________
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list