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]
Other format: [Raw text]

Compiling stdc++ with strong symbol versioning


Hello I'm relatively new to gcc development and I'm having trouble with
different versions of libstdc++.so being used at runtime. Basically I'm
creating an api which is used by a third party application (labview) which
uses libstdc++.so.5 my api needs to be compiled with libstdc++.so.6. 
basically when every I run something like this:

std::string b = "bee";
std::string c = "see";

std::string a = b + c;

I get runtime crash because as far as I can tell the b+c string is allocated
with the 6 allocate symbol and deallocated with the 5 dealloc symbol.

This issue is detailed in the following gcc bug:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405
The resolution appears to be detailed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24660

As far as I can tell (PLEASE tell me if I'm mistaken) I need to recompile
either my gcc compiler (version 4.1.2) or the stdlibc++.so.6 with the
--enable-symvers=gnu-versioned-namespaces flag then recompile my application
with the new compiler/ stdc++ library. 

So my question is how do I do this? Do I need to recompile just my stdc++
library or my entire gcc compiler is this documented some where.



-- 
View this message in context: http://www.nabble.com/Compiling-stdc%2B%2B-with-strong-symbol-versioning-tp23618767p23618767.html
Sent from the gcc - Help mailing list archive at Nabble.com.


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