ermig1979 / Simd

C++ image processing and machine learning library with using of SIMD: SSE, AVX, AVX-512, AMX for x86/x64, VMX(Altivec) and VSX(Power7) for PowerPC, NEON for ARM.
http://ermig1979.github.io/Simd
MIT License
2.04k stars 407 forks source link

Building with clang fails at linking #156

Closed ngzhian closed 3 years ago

ngzhian commented 3 years ago
mkdir build
cd build
CXX=clang CC=clang cmake ../prj/cmake/ -DSIMD_TOOLCHAIN="" -DSIMD_TARGET=""
..
Test.cpp:(.text+0xdd): undefined reference to `operator delete(void*)'
/usr/bin/ld: Test.cpp:(.text+0x127): undefined reference to `operator delete(void*)'
/usr/bin/ld: Test.cpp:(.text+0x157): undefined reference to `operator delete(void*)'
/usr/bin/ld: Test.cpp:(.text+0x166): undefined reference to `operator delete(void*)'
...
/usr/bin/ld: libSimd.a(SimdBaseShiftBilinear.cpp.o): in function `Simd::Base::CommonShiftAction(unsigned char const*&, unsigned long, unsigned long&, unsigned long&, unsigned long, unsigned char const*, unsigned long, double const*, double const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned char*&, unsigned long, int&, int&)':
SimdBaseShiftBilinear.cpp:(.text+0x1701): undefined reference to `floor'
/usr/bin/ld: SimdBaseShiftBilinear.cpp:(.text+0x1725): undefined reference to `floor'
/usr/bin/ld: SimdBaseShiftBilinear.cpp:(.text+0x17b8): undefined reference to `floor'
/usr/bin/ld: SimdBaseShiftBilinear.cpp:(.text+0x17e2): undefined reference to `floor'
/usr/bin/ld: libSimd.a(SimdBaseThread.cpp.o): in function `Simd::Base::SetThreadNumber(unsigned long)':
SimdBaseThread.cpp:(.text+0x15): undefined reference to `std::thread::hardware_concurrency()'

I think I am missing some command line flags, do you have any idea what's going on here?

ngzhian commented 3 years ago

Oh nvm, I needed: CXX=clang++.