Can g++5.4 link library compiled by gcc4.8 safely?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear developers,

I have got a problem about g++ compatibility.

I want to compile a c++ program by g++5.4, which need to link a library
compiled by g++4.8. I noticed the dual_abi
<https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html> since
g++5.1, so I set -D_GLIBCXX_USE_CXX11_ABI=0 in my CMakeLists.txt. The
compilation is ok but I got segmentation fault when I run the program.
To make it clear, the program works well when I downgrade my compiler to
g++4.8.
I wonder if there is any way we can link old library compiled by g++4.8
without downgrade high version g++ compiler (g++5.1 above) ?

Any suggestions and response would be appreciated!.

Thank you!
izhiqiu chen



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux