From mboxrd@z Thu Jan 1 00:00:00 1970 From: pmills@my-deja.com To: help-gcc@gnu.org Subject: stdc++ and shared objects Date: Fri, 10 Dec 1999 06:30:00 -0000 Message-id: <82r2a3$u6l$1@nnrp1.deja.com> X-SW-Source: 1999-12/msg00150.html I've recently moved from 2.8x gcc to 2.95.1 on Solaris 2.6. There are some real improvements, but I'm confused about using the C++ standard libraries. My application uses a number of shared objects/dynamic libraries (.so files). Within that code I use C++ standard classes such as , , and a bunch of others. With the 2.8 release and libstdc++.so, this worked fine, but with the static version of stdc++ I'm not sure what I'm supposed to do. If I don't link with the .a library, I get unresolved symbols at run time for anything in my .so that's not also in my primary executable (which *is* linked against libstdc++.a). If I try to link my .so explicitly with libstdc++.a, it fails with a bunch of "Text relocation remains" errors. I assume this is because the .a file contents were not compiled PIC. Are there instructions somewhere for doing this? Thanks in advance for and hints or pointers. Sent via Deja.com http://www.deja.com/ Before you buy. From mboxrd@z Thu Jan 1 00:00:00 1970 From: pmills@my-deja.com To: help-gcc@gnu.org Subject: stdc++ and shared objects Date: Fri, 31 Dec 1999 22:24:00 -0000 Message-ID: <82r2a3$u6l$1@nnrp1.deja.com> X-SW-Source: 1999-12n/msg00150.html Message-ID: <19991231222400.xUPIv2uthDApN7CKxYGk8a0vgPfR99uNQKqBbl0LjiQ@z> I've recently moved from 2.8x gcc to 2.95.1 on Solaris 2.6. There are some real improvements, but I'm confused about using the C++ standard libraries. My application uses a number of shared objects/dynamic libraries (.so files). Within that code I use C++ standard classes such as , , and a bunch of others. With the 2.8 release and libstdc++.so, this worked fine, but with the static version of stdc++ I'm not sure what I'm supposed to do. If I don't link with the .a library, I get unresolved symbols at run time for anything in my .so that's not also in my primary executable (which *is* linked against libstdc++.a). If I try to link my .so explicitly with libstdc++.a, it fails with a bunch of "Text relocation remains" errors. I assume this is because the .a file contents were not compiled PIC. Are there instructions somewhere for doing this? Thanks in advance for and hints or pointers. Sent via Deja.com http://www.deja.com/ Before you buy.