egcs & Dynamic Libraries
Jean-Michel Paris
Jean-Michel.Paris@pt.nce.sita.int
Tue Oct 13 19:22:00 GMT 1998
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
More information about the Gcc
mailing list