Problems when combining C++ code compiled with icpc and g++

Problems when combining C++ code compiled with icpc and g++

Using icpc version 9.0, we develop a C++ library that export a pure C API. When compiling the C++ code that use pthread API, we have problems when threads are canceled. Using pthread_cancel/pthread_join, we get a "terminate called without and active exception" error in some cases (depending of what kind of code is actually running in the threads)

By changing the link options to use Intel libraries (with -cxxlib-icc) the problem was solved but then other happened:

- C++ applications compiled with g++ that dynamically link with our C++ code [with C API library] crash with SIGEV in library in std::locate_GetFacet().

- C applications compiled with gcc work but get an "Error : execption not from a C++ routine" again when canceling threads.

So basically is seems that a C++ library compiled with icpc and linked with Intel libraries cannot be used safely by code compiled with g++/gcc.

So it seems that the right way would be to compile with icpc and link with gcc (-cxxlib-gcc) but then wae are bock to the first decribed problems?

Any idea?


Best Regards

Stephane Letz

1 envío / 0 nuevos
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.