Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

Linux GCC 5.2.0 ICC 16.0.3 binutils 2.25 - Dual ABI

Konrad_L_1
Beginner
559 Views

Hi,

I'm currently starting using icc instead of the gcc.
On my Debian 8 is a gcc-4.7 as system compiler installed.
Additionally I added gcc-5.2.0 from soruce, which works pretty nice.

I need to know, if icc compiles the source file using the new ABI for std::string.

I have a libA, which compiles.
I have a libB, which depends an libA and compiles too.
If I compile the main() part, which links against the libA. I got an error:

undefined reference to `class::text[abi:cxx11]()'

 

I cannot set _GLIBCXX_USE_CXX11_ABI 0 , I need the cxx11 std::string handling.

More info:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
https://software.intel.com/en-us/forums/intel-c-compiler/topic/591174

Thx
Konrad

0 Kudos
2 Replies
Anoop_M_Intel
Employee
559 Views

Which version of Intel C++ Compiler are you using? If you are using ICC 16.0.3 in GCC 5.1 compatibility mode or above, macro _GLIBCXX_USE_CXX11_ABI set to 1. Are you building libA, libB and final executable using the same ICC compiler (same compatibility mode) or is there a mixing and matching here?

Thanks and Regards
Anoop

 

0 Kudos
Anoop_M_Intel
Employee
559 Views

I see a similar thread from you. So closing this thread.

Thanks and Regards
Anoop

0 Kudos
Reply