home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / gcc / help / 3049 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.9 KB  |  39 lines

  1. Newsgroups: gnu.gcc.help
  2. Path: sparky!uunet!UB.com!pacbell.com!decwrl!ames!haven.umd.edu!darwin.sura.net!sgiblab!munnari.oz.au!csis!mizar!dave
  3. From: dave@mizar.csis.dit.csiro.au (David Campbell)
  4. Subject: Shared libraries with gcc/g++
  5. Message-ID: <1993Jan28.002511.5500@csis.dit.csiro.au>
  6. Sender: dave@mizar (David Campbell)
  7. Nntp-Posting-Host: mizar
  8. Organization: CSIRO Division of Information Technology
  9. Date: Thu, 28 Jan 1993 00:25:11 GMT
  10. Lines: 27
  11.  
  12. Hi.  Does anybody know if there are any special tricks to using shared
  13. libraries with gcc/g++ (version 2.3.3)?
  14.  
  15. I'm using a sparc platform and successfully build shared libraries using
  16. Sun C++ 2.1 by compiling with -PIC and putting all global variables into one
  17. object which becomes libxx.sa.0.1 and the other objects into libxx.so.0.1.
  18.  
  19. ...but when it comes to g++, the libraries build OK with -fPIC but when I am
  20. linkingan application, I get a failure with unresolved symbols which are all
  21. defined in libxx.sa.0.1.
  22.  
  23. gcc/g++ is using sun's linker.
  24.  
  25. Any help would be appreciated.
  26.  
  27. Regards,
  28.   +--------------------------------------------------+-----------------------+
  29.   | Dave Campbell                                    |            UNIX & C++ |
  30.   | Phone: + 61 6 275 0944      Fax: + 61 6 257 1052 |   _--_|\       PLEASE |
  31.   | CSIRO Division of Information Technology         |  /      \             |
  32.   | Centre for Spatial Information Systems           |  \_.--._/ <- Canberra |
  33.   | PO BOX 664                                       |        v              |
  34.   | CANBERRA ACT 2601       +------------------------+                       |
  35.   | AUSTRALIA               | dave@csis.dit.csiro.au |                       |
  36.   +-------------------------+------------------------+-----------------------+
  37.   |                       Get right.....or get left.                         |
  38.   +--------------------------------------------------------------------------+
  39.