using libraries with ld (1)

der Mouse mouse at mcgill-vision.UUCP
Thu Aug 15 07:50:05 AEST 1985


>> You can always just name the library in the "ld" or "cc" command:
>> 	cc -o myprog myprog.o mysub.o mylib.a -lm -lplot
>
>I was under the impression that libraries specified in the way that mylib.a
>is have the entire library linked in rather than just those routines which
>are needed because of undefined identifiers.  Does anyone know if this is
>actually the case?

I had occasion  to play with  the  loader a while ago.   Under 4.2bsd at
least, this is  not the case.   Naming an archive in full is exactly the
same as using a -l option which refers to the same archive.
-- 
					der Mouse
				System hacker and general troublemaker
				CVaRL, McGill University

Hacker: One responsible for destroying /
Wizard: One responsible for recovering it afterward



More information about the Comp.unix mailing list