Undefined libraries when cross compiling application

Hello all,

I want to cross compile an openCV application for an ARMs target running linux. I think i finally managed to crosscompile the libraries. When compiling the application i have to reference all the libraries. I then get a bunch of “undefinied refrence” errors within the libs. I only will copy a section of the terminal output since its a lot.

This is my command:

/home/apc1wi/Documents/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-g++ test.cpp -o test_EVAL -I /usr/local/include/opencv4 -L/home/apc1wi/Documents/opencv_crosscompile/opencv-4.x/build/lib/ -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_objdetect -lopencv_videoio -lopencv_dnn -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann

and this is the output

/home/apc1wi/Documents/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/…/lib/gcc/aarch64-none-linux-gnu/9.2.1/…/…/…/…/aarch64-none-linux-gnu/bin/ld: /home/apc1wi/Documents/opencv_crosscompile/opencv-4.x/build/lib//libopencv_core.so: undefined reference to VTT for std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >@GLIBCXX_3.4.21' /home/apc1wi/Documents/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/9.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/apc1wi/Documents/opencv_crosscompile/opencv-4.x/build/lib//libopencv_core.so: undefined reference to vtable for std::basic_streambuf<char, std::char_traits >@GLIBCXX_3.4’
/home/apc1wi/Documents/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/…/lib/gcc/aarch64-none-linux-gnu/9.2.1/…/…/…/…/aarch64-none-linux-gnu/bin/ld: /home/apc1wi/Documents/opencv_crosscompile/opencv-4.x/build/lib//libopencv_core.so: undefined reference to std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::find_first_not_of(char const*, unsigned long, unsigned long) const@GLIBCXX_3.4.21' /home/apc1wi/Documents/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/9.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/apc1wi/Documents/opencv_crosscompile/opencv-4.x/build/lib//libopencv_core.so: undefined reference to __cxa_throw_bad_array_new_length@CXXABI_1.3.8’
/home/apc1wi/Documents/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/bin/…/lib/gcc/aarch64-none-linux-gnu/9.2.1/…/…/…/…/aarch64-none-linux-gnu/bin/ld: /home/apc1wi/Documents/opencv_crosscompile/opencv-4.x/build/lib//libopencv_dnn.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits, std::allocator >::compare(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const@GLIBCXX_3.4.21’