From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,4201ec1530496d5d,start X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2001-01-24 11:40:12 PST Path: supernews.google.com!sn-xit-02!sn-xit-04!supernews.com!216.227.56.88.MISMATCH!telocity-west!TELOCITY!cyclone.bc.net!logbridge.uoregon.edu!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: brucebailey3@my-deja.com Newsgroups: comp.unix.tru64 Subject: Best way to include template instantiations in common libraries? Date: Wed, 24 Jan 2001 19:31:45 GMT Organization: Deja.com Message-ID: <94naj1$lid$1@nnrp1.deja.com> NNTP-Posting-Host: 139.126.32.100 X-Article-Creation-Date: Wed Jan 24 19:31:45 2001 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) X-Http-Proxy: 1.0 PEPSI, 1.0 x73.deja.com:80 (Squid/1.1.22) for client 139.126.32.100 X-MyDeja-Info: XMYDJUIDbrucebailey3 Xref: supernews.google.com comp.unix.tru64:1556 Hi I am trying to use c++ to create libraries with some common utilities. BTW, I am using the stl. I run into a problem when trying to link the libraries into the main program in that the symbols that reside in the cxx_repository are not found by the linker. Library directory makefile: ar -cr libFunctions.a module1.o module2.o Main program directory makefile: cxx -o MainPgm MainPgm.o -L../libdir -lFunctions . . . However, when I move the library project and the main project into the same directory, everything links just fine. What is the best way to create libraries that will link correctly? Should I link the contents of cxx_repository into the archive lib? Are shared object libraries better? Thanks, Bruce Sent via Deja.com http://www.deja.com/