Open rotu opened 4 years ago
Ubuntu Focal / Cmake 3.16.3 / Clang 11 / Foxy Master
--- stderr: class_loader ld.lld: error: ../../libclass_loader.so: undefined reference to Poco::SharedLibrary::SharedLibrary(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [test/fviz_case_study/CMakeFiles/class_loader_Test_Fviz_Main.dir/build.make:90: test/fviz_case_study/class_loader_Test_Fviz_Main] Error 1 make[1]: *** [CMakeFiles/Makefile2:403: test/fviz_case_study/CMakeFiles/class_loader_Test_Fviz_Main.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:141: all] Error 2 --- Failed <<< class_loader [ Exited with code 2 ]
I seem to be able to reproduce this with clang versions 9,10,11 (didn't test earlier). But only when clang has CXXFLAGS+=" -stdlib=libc++".
CXXFLAGS+=" -stdlib=libc++"
Ubuntu Focal / Cmake 3.16.3 / Clang 11 / Foxy Master