将MIC应用程序的源与英特尔C ++(icpc)编译器链接时,出现错误。
intel-icc / 2013-64版本:
SOMETHINGMIC.o: relocation R_X86_64_PC32 against undefined symbol `_ZN9__gnu_cxx21__atomic_add_dispatchEPii' can not be used when making a shared object; recompile with -fPIC
x86_64-k1om-linux-ld: final link failed: Bad value
intel-icc / 2015-64版本:
SOMETHINGMIC.o: In function `std::locale::facet::_M_add_reference() const': /usr/linux-k1om-4.7/linux-k1om/../x86_64-k1om-linux/include/c++/4.7.0 bits/locale_classes.h:402: undefined reference to `__gnu_cxx::__atomic_add_dispatch(int*, int)'
SOMETHINGMIC.o: In function `std::locale::facet::_M_remove_reference() const': /usr/linux-k1om-4.7/linux-k1om/../x86_64-k1om-linux/include/c++/4.7.0 bits/locale_classes.h:409: undefined reference to __gnu_cxx::__exchange_and_add_dispatch(int*, int)'
SOMETHINGMIC.o: In function `std::locale::_Impl::_M_add_reference()': /usr/linux-k1om-4.7/linux-k1om/../x86_64-k1om-linux/include/c++/4.7.0/bits/locale_classes.h:511: undefined reference to `__gnu_cxx::__atomic_add_dispatch(int*, int)'
SOMETHINGMIC.o: In function `std::locale::_Impl::_M_remove_reference()': /usr/linux-k1om-4.7/linux-k1om/../x86_64-k1om-linux/include/c++/4.7. /bits/locale_classes.h:518: undefined reference to `__gnu_cxx::__exchange_and_add_dispatch(int*, int)'
SOMETHINGMIC.o: In function `std::ios_base::_Callback_list::_M_add_reference()': /usr/linux-k1om-4.7/linux-k1om/../x86_64-k1om-linux/include/c++/4.7.0/bits/ios_base.h:475: undefined reference to `__gnu_cxx::__atomic_add_dispatch(int*, int)'
SOMETHINGMIC.o: In function `std::ios_base::_Callback_list::_M_remove_reference()': /usr/linux-k1om-4.7/linux-k1om/../x86_64-k1om-linux/include/c++/4.7.0/bits/ios_base.h:483: undefined reference to `__gnu_cxx::__exchange_and_add_dispatch(int*, int)'
这是什么?
答案 0 :(得分:0)
__gnu_cxx::__atomic_add_dispatch(int*, int);
需要与。链接。