to build an so containing libgcc.so and libstdc++.so

Venkatakrishnan, V v.venkatakrishnan@channels.usa.xerox.com
Fri Aug 29 12:19:00 GMT 2003


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



More information about the Gcc-help mailing list