libstdc++/10633: linking error with stdc++ library
Phil Edwards
phil@jaj.com
Tue May 6 18:05:00 GMT 2003
On Tue, May 06, 2003 at 09:30:40AM -0400, Philip Cheng wrote:
>
> gcc -c test.cpp
>
> g++ -lc -lstdc++ -shared test.o -o test.so
If you are trying to make a shared library, the commands are
gcc -c -fPIC test.cpp
g++ -shared -fPIC test.cpp -o test.so
as described in the FAQ here:
http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#4_4_dlsym
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams
More information about the Gcc-bugs
mailing list