using libraries with ld (1)
Andrew Koenig
ark at alice.UUCP
Sat Aug 10 01:00:35 AEST 1985
>> Some versions of "ld" support the "-Llibpath" option to specify an
>> additional directory to search for libraries.
>>
>> 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?
> Rick Busdiecker
> rfb at cmu-cs-h.arpa
It is not actually the case.
When you name a library as an argument to ld, it picks out
only the components it needs.
More information about the Comp.unix
mailing list