This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs & Dynamic Libraries
- To: egcs at cygnus dot com
- Subject: egcs & Dynamic Libraries
- From: Jean-Michel Paris <Jean-Michel dot Paris at pt dot nce dot sita dot int>
- Date: Tue, 13 Oct 1998 17:07:56 +0200
- Organization: SITA
I would like to migrate our project from SparcWorks compiler to
egcs-1.1b.
For that, I have to create some dynamic libraries (.so).
I do the following compilation command:
g++ -c -g -fpic foo.cc
1°/ Should I prefer -fPIC to -fpic ? What are the differents meanings ?
[generating the library]
g++ -g -shared -o foo.so foo.o
2°/ Doing that on a little example, the library size go from 15kb
(static .a) to 350Kb. I suppose this
overhead is due to some dynamic resolution ?!
3°/ How can I write the compilation command to produce the desired
executable.
Using the foo.so library.
For Solaris, I would like, of course, to only set the
LD_LIBRARY_PATH.
For Linux, a new entry in /etc/ld.conf.
g++ -o foo ......????
--
Jean-Michel Paris - Software Engineer
SITA Group http://www.sita.int
Internetworking Products & Services Program
Bât Héraklion - 1041 Route des Dolines
Sophia Antipolis
06560 VALBONNE - FRANCE
mailto:Jean-Michel.Paris@pt.nce.sita.int