From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b5dc64466a3dd2b5 X-Google-Attributes: gidfee84,public X-Google-Thread: 11035d,b5dc64466a3dd2b5 X-Google-Attributes: gid11035d,public X-Google-Thread: fb4a0,b5dc64466a3dd2b5 X-Google-Attributes: gidfb4a0,public From: tomx@hotmail.com Subject: Re: How to make a dynamic linked library? Date: 1999/04/23 Message-ID: <7fqs0i$nss$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 470109484 References: <3719391A.47B64999@hopper.math.uwaterloo.ca> <3720B83D.BD17BAB2@wang.com> X-Http-Proxy: 1.0 x12.dejanews.com:80 (Squid/1.1.22) for client 192.128.133.43 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Fri Apr 23 22:25:26 1999 GMT Newsgroups: comp.unix.osf.osf1,comp.unix.solaris,comp.unix.unixware,comp.unix.osf.osf1 X-Http-User-Agent: Mozilla/4.5 [en] (X11; I; SunOS 5.5.1 sun4m) The GNU equivalents are: "-shared" to produce a shared object, and "-fpic" to generate position-independent-code... -Gigy Thomas In article <3720B83D.BD17BAB2@wang.com>, Doug Hockin wrote: > I don't have experience with the GNU compiler but can give > suggestions for SVR4 and they are probably similar. > > Compile the program with the -Kpic option to produce position > independent > code. Then link it with -dy (to get it dynamically linked) and -G (to > make it a shared library). > > When you compile/link the programs that will use the library you need > to link them > with a -l option. If you name your library libmine and put it into > /usr/lib then you can use -lmine. If you put the library somewhere > else you'll also need to use -Lpath to specify the path to your library. > The -L option should precede the -l option on the command line. > > -- Doug > -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own