Article View: gnu.gcc.help
Article #903Shared libraries with gcc/g++
From: David Campbell
Date: Thu, 28 Jan 1993 00:25
Date: Thu, 28 Jan 1993 00:25
27 lines
1949 bytes
1949 bytes
Hi. Does anybody know if there are any special tricks to using shared libraries with gcc/g++ (version 2.3.3)? I'm using a sparc platform and successfully build shared libraries using Sun C++ 2.1 by compiling with -PIC and putting all global variables into one object which becomes libxx.sa.0.1 and the other objects into libxx.so.0.1. ...but when it comes to g++, the libraries build OK with -fPIC but when I am linkingan application, I get a failure with unresolved symbols which are all defined in libxx.sa.0.1. gcc/g++ is using sun's linker. Any help would be appreciated. Regards, +--------------------------------------------------+-----------------------+ | Dave Campbell | UNIX & C++ | | Phone: + 61 6 275 0944 Fax: + 61 6 257 1052 | _--_|\ PLEASE | | CSIRO Division of Information Technology | / \ | | Centre for Spatial Information Systems | \_.--._/ <- Canberra | | PO BOX 664 | v | | CANBERRA ACT 2601 +------------------------+ | | AUSTRALIA | dave@csis.dit.csiro.au | | +-------------------------+------------------------+-----------------------+ | Get right.....or get left. | +--------------------------------------------------------------------------+
Technical Details
Message-ID:
<1993Jan28.002511.5500@csis.dit.csiro.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!UB.com!pacbell.com!decwrl!ames!haven.umd.edu!darwin.sura.net!sgiblab!munnari.oz.au!csis!mizar!daveShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!UB.com!pacbell.com!decwrl!ames!haven.umd.edu!darwin.sura.net!sgiblab!munnari.oz.au!csis!mizar!dave From: dave@mizar.csis.dit.csiro.au (David Campbell) Subject: Shared libraries with gcc/g++ Message-ID: <1993Jan28.002511.5500@csis.dit.csiro.au> Sender: dave@mizar (David Campbell) Nntp-Posting-Host: mizar Organization: CSIRO Division of Information Technology Date: Thu, 28 Jan 1993 00:25:11 GMT Lines: 27