[Gllug] library includes and compiling

tet at accucard.com tet at accucard.com
Thu Jan 10 09:02:02 UTC 2002


>yuck. ITYM
>
>gcc -O2 -Wall -ansi -pedantic -o source source.c -L/usr/X11R6/lib -lGL

If you're doing that, you might as well go the whole hog and add:

	-pedantic-errors -Wl,-rpath /usr/X11R6/lib

The latter option is probably a good idea anyway. I just wish their was
a way to get the linker to automatically add a directory to the run path
if it links a library from that directory. The Solaris linker does this
(or used to -- it's been many years since I've used it).

Oh, and while I'm at it, -Wl? What muppet thought to use -W for that
where everywhere else in gcc, it's used to enable/disable warnings
(apart from the equally dumb -Xa). Yeah, I could use -Xlinker, but
that's ugly, particularly for linker flags that take an argument.

Tet

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




More information about the GLLUG mailing list