Building shared library that uses libstdc++
Lundell, Jens O.
JENS.O.LUNDELL@saic.com
Mon Apr 16 09:44:00 GMT 2001
>> Jens Lundell wrote:
>> Do I have to distribute libstdc++.so.2.10.0 together with my shared
library?
> Alexandre Oliva wrote:
> Specify the full pathname of libstdc++.a, and use the -mimpure-text
> switch, such that the linker won't complain even though libstc++.a
> contains non-PIC.
I tried,
g++ -fPIC -mimpure-text -shared -o libjens.so source.cpp
/usr/local/lib/libstdc++.a.2.10.0
which compiles fine but both ldd and elfdump reveals that the resulting
library (libjens.so) still depends on libstdc++.so.2.10.0.
-Jens
More information about the Gcc-help
mailing list