This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Building shared library that uses libstdc++


I want to build a shared library that uses the Standard C++ Library using
Solaris 7 and GCC 2.95.3. I would prefer to statically link the Standard C++
library so I don't have to distribute libstdc++.so.2.10.0. I can create a
shared library like this:

g++ -fPIC -shared -o libjens.so source.cpp

and I can statically link the Standard C++ Library to an executable like
this:

g++ -static -o jensexe source.cpp

but when I combine the two I get the following error:

ld: warning: option -d appears more than once, first setting taken
ld: fatal: option -dn and -z[text|textwarn|textoff] are incompatible
ld: fatal: option -dn and -G are incompatible
ld: fatal: Flags processing errors
collect2: ld returned 1 exit status

Do I have to distribute libstdc++.so.2.10.0 together with my shared library?
Is so, what happens if the machine already has a different version of
libstdc++, dll-hell?

-Jens


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]