Reputation: 4820
I'm running on Linux and I got a library (.a) which was compiled by Intel compiler.
I'm trying to link against this static library (I'm using g++) and getting link error:
undefined reference to intel_fast_memcpy
I requested to get the library as a shared library (.so) which was compiled by intel compiler too, and I got the same error.
How can I use libraries which were compiled by Intel compiler, when I'm using gcc?
Upvotes: 2
Views: 686
Reputation: 7458
As far as I know, there is no way to link C++ client code against C++ libraries built with different compiler (even same compiler name but different versions don't work). C++ -linkage is not stanrardised.
However, C-linkage is. If you wrap a library to export the symbols as C, (external "C"{ } - block in your code) you could use these libraries with any compiler, and even not only with C/C++; For doing this, the wrapper-lib should be built with intel-compiler in your case.
Upvotes: 1