[quake2] revamped build system

Thomas J Fogal tfogal at pascal.unh.edu
Sun Sep 19 13:40:09 EDT 2004

 <414DBCD9.2050000 at asfandyar.cjb.net>Asfand Yar Qazi writes:


> Putting all object files on the command line makes ld search 
> every object file for every dependancy, which is why I think that 
> works.
> To fix this, do the following-like:
> gcc -g -Wall -pipe -DQMAX -DLINUX_VERSION="\"3.21+\"" \
> -Lclient/ -Llinux/ -Lqcommon/ -Lserver/ \
> -Wl,-( -llinux -lclient -lserver -lqcommon -Wl,-) -lm \
> -ldl -Wl,-rpath,/usr/lib -lSDL -lpthread

*blink* wow, thats amazing. Worked great once I figured out I had to
escape ( and ).

> Do a 'man ld' and search for the option '--begin-group' 
> (abbreviated to '-('  ) - enclosing the libs in -( and -) makes 
> ld search every archive in that group for every external 
> dependancy in that group.  I hope that works.

This is an interesting caveat I never would have guessed or even
thought to look for -- thanks!
I'm down to two undefined references in snd_mix but I think they are
probably just stupidity on my part.

Thanks again!


More information about the quake2 mailing list