Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 exptools; site whuxl.UUCP
Path: utzoo!linus!philabs!prls!amdimage!amdcad!amd!vecpyr!lll-crg!gymble!umcp-cs!seismo!harvard!think!mit-eddie!genrad!decvax!harpo!whuxlm!whuxl!mike
From: mike@whuxl.UUCP (BALDWIN)
Newsgroups: net.unix
Subject: Re: using libraries with ld(1)
Message-ID: <694@whuxl.UUCP>
Date: Wed, 14-Aug-85 17:34:50 EDT
Article-I.D.: whuxl.694
Posted: Wed Aug 14 17:34:50 1985
Date-Received: Tue, 20-Aug-85 02:08:08 EDT
References: <125@shell.UUCP> <243@lzwi.UUCP>
Distribution: net
Organization: AT&T Bell Laboratories, Whippany
Lines: 16

> Well, in System V ld(1) has a -L option, followed by the name of a
> directory to be searched before /lib and /usr/lib.  Usage
> 	cc -c foo.c && ld -o foo -L/usr/jrandom/lib -lglarch -lc
> or
> 	cc -o foo foo.c -Wl,-L/usr/jrandom/lib -lglarch
> (-Wl can be used to pass arguments to the linker from cc(1); there
> were so many options to each, cc could no longer just assume
> all linker commands were unrecognized and vice versa, and don't
> flame at me for it!)

On SVR2 you can use -L on the cc command line without -Wl, e.g.:
	cc -o foo foo.c -L/usr/jrandom/lib -lglarch
-- 
						Michael Baldwin
						AT&T Bell Labs
						harpo!whuxl!mike