0
/usr/bin/cmake -E cmake_link_script CMakeFiles/YikeSim.dir/link.txt --verbose=1
/data/mpich/bin/mpic++   -Wl,--rpath=./shared_lib/linux -std=c++17 -g -O3 -mavx -fopenmp -Wall -D CMAKE_COMPILE -L /usr/lib64      CMakeFiles/YikeSim.dir/src/main/main.cpp.o CMakeFiles/YikeSim.dir/src/yikesim/extern/NanoLog.cpp.o  -o out/build/mingw-build/YikeSim  -L/data/project/YikeFDTDBook/YikeSim/shared_lib/linux  -L/data/project/YikeFDTDBook/YikeSim/static_lib/linux -rdynamic -lboost_timer -lboost_chrono -lboost_thread -lpython3.8 -lc -lopenblas -lgmsh -lpthread -Wl,-rpath,/data/project/YikeFDTDBook/YikeSim/shared_lib/linux:/data/project/YikeFDTDBook/YikeSim/static_lib/linux 
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: CMakeFiles/YikeSim.dir/src/main/main.cpp.o: in function `std::string::_M_check(unsigned long, char const*) const':
/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/basic_string.h:3392: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/basic_string.h:3392: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)'

This is the message I get when I compile the program with an error. I have searched the web for a solution and most of the answers are about the GCC version. But I have tried devtoolset-8, devtoolset-9, devtoolset-10 and still get the same error. I hope there is an effective solution to this problem, thank you very much.

yhj
  • 1
  • 1
  • Please don't post code or error messages as images. Instead copy-paste as text. – wohlstad Sep 01 '22 at 09:04
  • Possible duplicate [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Jesper Juhl Sep 01 '22 at 09:59
  • This looks like a mismatch between your compiler and the libstdc++ used for linking which is probably the old and default one on your system. Does your LD_LIBRARY_PATH include the path to the appropriate libstdc++ ? – Charles G Sep 01 '22 at 10:22
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 01 '22 at 15:18

0 Answers0