[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [How] Static linking



>>>>> On Thu, 26 Mar 1998 15:35:14 -0500, Shaleh <shaleh@livenet.net> said:

 Shaleh> -static is a linker flag.  Most Makefiles have a LDFLAGS
 Shaleh> section.  Add it there.  If not, find a -l or -L and add it
 Shaleh> to the end of that.

Well you should only do this if you want the whole thing statically
linked.  If you just want the motif library statically linked then you 
should do something like:

gcc -o foo file-test.c -Wl,-Bstatic -lz -Wl,-Bdynamic

-Wl passes on the argument after the , to the linker which will switch 
from dynamic to static and back again with the -Bdynamic.

Dres
-- 
@James LewisMoss <dres@dimensional.com> |  Blessed Be!
@    http://www.dimensional.com/~dres   |  Linux is cool!
@"Argue for your limitations and sure enough, they're yours." Bach



--
To UNSUBSCRIBE, email to debian-mentors-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: