This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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