This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: to build an so containing libgcc.so and libstdc++.so
- From: "Venkatakrishnan, V" <v dot venkatakrishnan at channels dot usa dot xerox dot com>
- To: "'Eljay Love-Jensen'" <eljay at adobe dot com>, ashende at cisco dot com, gcc-help at gcc dot gnu dot org
- Date: Fri, 29 Aug 2003 08:19:12 -0400
- Subject: RE: to build an so containing libgcc.so and libstdc++.so
Hi Eljay,
Linking using -static leads to errors. coz. it then reports all
other symbols being linked in some other custom libs to be undefined.
For example
g++ -L/usr/local/lib -lmyLib1 -lmyLib2 -o myApp
worked fine but
g++ -L/usr/local/lib -lmyLib1 -lmyLib2 -static -lstdc++ -o myApp
reports
ld: 0711-317 ERROR: Undefined symbol: mysymbol1
ld: 0711-317 ERROR: Undefined symbol: mysymbol2
ld: 0711-317 ERROR: Undefined symbol: mysymbol3 etc.....
Any guesses why???
-----Original Message-----
From: Eljay Love-Jensen [mailto:eljay@adobe.com]
Sent: Friday, August 29, 2003 5:30 PM
To: ashende@cisco.com; gcc-help@gcc.gnu.org
Subject: Re: to build an so containing libgcc.so and libstdc++.so
Hi Ashay,
Try linking against the static versions of those libraries. For instance,
g++ foo.cpp -static
HTH,
--Eljay