Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!uakari.primate.wisc.edu!ames!sgi!shinobu!odin!texas.esd.sgi.com!robert From: robert@texas.esd.sgi.com (Robert Skinner) Newsgroups: comp.sys.sgi Subject: Re: ar - the archiver Message-ID: <4757@odin.SGI.COM> Date: 1 Mar 90 17:30:22 GMT References: <9002281129.aa20377@SMOKE.BRL.MIL> Sender: news@odin.SGI.COM Reply-To: robert@sgi.com Organization: Silicon Graphics Inc., Entry Systems Division Lines: 33 In article <9002281129.aa20377@SMOKE.BRL.MIL>, JORDAN@gmr.COM writes: > Can someone give me any tips on using ar, or lead me to any books that > might be able to help me. > > I am able to create a library, add objects, and update symbol tables > (e.g. ar cr lib.a a.o b.o, or ar ts lib.a), BUT I would like the compilerr > to recognize it via a flag; for example, the way it recognizes -Zg, or -lgl_s. > > Thanks for any help... > > tp mugabi-jordan Look at the -L option in the man page for 'ld'. It allows you to set the directories 'ld' will use to search for libraries you have named with -L. For example, you can name your library libmylib.a, put it in /usr/people/me/lib, and then have a link line that looks like cc ..... -L/usr/people/me/lib ... -lmylib (cc just calls ld to link.) This isn't much help for just one private library, but its great if you have several. The -Zg option is obsolete on 4D systems and should not be used. It is equivalent to using '-lgl -lm' in the link command. Besides, explicitly saying -lgl makes it easier to change to -lgl_s and back. Robert Skinner robert@sgi.com Whoa Homer, don't have a cow. - Bart Simpson