This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
libstdc++ linked as libstdc++.a
- From: Christoph Bugel <chris at tti-telecom dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Thu, 14 Nov 2002 11:32:03 +0200
- Subject: libstdc++ linked as libstdc++.a
Similar to the original poster I want to link with the *static*
libstdc++.a. However, I am distributing a shared library, not an
executable. (implemented in C++ but the API is extern "C")
linking with -static doesn't work as I expected:
Linux$ g++ -fPIC -shared -static hello.cc -o libhello.so
Linux$ ldd ./libhello.so
libstdc++.so.5 => /usr/lib/libstdc++.so.5
(etc, etc)
Do I have to use -nostdinc and pick all libraries by hand or is
there an easier way?
Thanks