You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(base) tony@ubuntu:~/Downloads/Android/HelloWorld/build$ make -j8
[ 50%] Building CXX object CMakeFiles/hello-world.dir/src/main.cpp.o
[100%] Linking CXX executable hello-world
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(matrix.cpp.o):matrix.cpp:function std::__ndk1::__throw_length_error[abi:nn180000](char const*): error: undefined reference to 'std::__ndk1::__libcpp_verbose_abort(char const*, ...)'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(matrix_transform.cpp.o):matrix_transform.cpp:function std::__throw_bad_array_new_lengthabi:nn180000: error: undefined reference to 'std::__ndk1::__libcpp_verbose_abort(char const*, ...)'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::Exception::formatMessage(): error: undefined reference to 'std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >::str() const'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::Exception::formatMessage(): error: undefined reference to 'VTT for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::Exception::formatMessage(): error: undefined reference to 'vtable for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::Exception::formatMessage(): error: undefined reference to 'vtable for std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function std::__ndk1::__throw_out_of_range[abi:nn180000](char const*): error: undefined reference to 'std::__ndk1::__libcpp_verbose_abort(char const*, ...)'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'VTT for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'vtable for std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'vtable for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >::str() const'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'vtable for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'vtable for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >::str() const'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >::str() const'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(check.cpp.o):check.cpp:function std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >::basic_stringstreamabi:nn180000: error: undefined reference to 'VTT for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(check.cpp.o):check.cpp:function std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >::basic_stringstreamabi:nn180000: error: undefined reference to 'vtable for std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(check.cpp.o):check.cpp:function cv::detail::check_failed_MatType(int, int, cv::detail::CheckContext const&): error: undefined reference to 'VTT for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(check.cpp.o):check.cpp:function cv::detail::check_failed_MatType(int, int, cv::detail::CheckContext const&): error: undefined reference to 'vtable for std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(logger.cpp.o):logger.cpp:function cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LogLevel, char const*): error: undefined reference to 'VTT for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(logger.cpp.o):logger.cpp:function cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LogLevel, char const*): error: undefined reference to 'vtable for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(logger.cpp.o):logger.cpp:function cv::utils::logging::internal::writeLogMessageEx(cv::utils::logging::LogLevel, char const*, char const*, int, char const*, char const*): error: undefined reference to 'VTT for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(logger.cpp.o):logger.cpp:function cv::utils::logging::internal::writeLogMessageEx(cv::utils::logging::LogLevel, char const*, char const*, int, char const*, char const*): error: undefined reference to 'vtable for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::parallel::ParallelBackendRegistry::dumpBackends() const: error: undefined reference to 'VTT for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::parallel::ParallelBackendRegistry::dumpBackends() const: error: undefined reference to 'vtable for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_highgui.a(highgui.cpp.o):highgui.cpp:function cv::imread(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&, int): error: undefined reference to 'vtable for std::__ndk1::basic_istringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_highgui.a(highgui.cpp.o):highgui.cpp:function cv::imread(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&, int): error: undefined reference to 'VTT for std::__ndk1::basic_istringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/hello-world.dir/build.make:105: hello-world] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/hello-world.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
编译时报错:
(base) tony@ubuntu:~/Downloads/Android/HelloWorld/build$ make -j8
[ 50%] Building CXX object CMakeFiles/hello-world.dir/src/main.cpp.o
[100%] Linking CXX executable hello-world
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(matrix.cpp.o):matrix.cpp:function std::__ndk1::__throw_length_error[abi:nn180000](char const*): error: undefined reference to 'std::__ndk1::__libcpp_verbose_abort(char const*, ...)'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(matrix_transform.cpp.o):matrix_transform.cpp:function std::__throw_bad_array_new_lengthabi:nn180000: error: undefined reference to 'std::__ndk1::__libcpp_verbose_abort(char const*, ...)'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::Exception::formatMessage(): error: undefined reference to 'std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >::str() const'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::Exception::formatMessage(): error: undefined reference to 'VTT for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::Exception::formatMessage(): error: undefined reference to 'vtable for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::Exception::formatMessage(): error: undefined reference to 'vtable for std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function std::__ndk1::__throw_out_of_range[abi:nn180000](char const*): error: undefined reference to 'std::__ndk1::__libcpp_verbose_abort(char const*, ...)'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'VTT for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'vtable for std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'vtable for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >::str() const'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'vtable for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'vtable for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >::str() const'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(system.cpp.o):system.cpp:function cv::HWFeatures::initialize(): error: undefined reference to 'std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >::str() const'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(check.cpp.o):check.cpp:function std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >::basic_stringstreamabi:nn180000: error: undefined reference to 'VTT for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(check.cpp.o):check.cpp:function std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >::basic_stringstreamabi:nn180000: error: undefined reference to 'vtable for std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(check.cpp.o):check.cpp:function cv::detail::check_failed_MatType(int, int, cv::detail::CheckContext const&): error: undefined reference to 'VTT for std::__ndk1::basic_stringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(check.cpp.o):check.cpp:function cv::detail::check_failed_MatType(int, int, cv::detail::CheckContext const&): error: undefined reference to 'vtable for std::__ndk1::basic_stringbuf<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(logger.cpp.o):logger.cpp:function cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LogLevel, char const*): error: undefined reference to 'VTT for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(logger.cpp.o):logger.cpp:function cv::utils::logging::internal::writeLogMessage(cv::utils::logging::LogLevel, char const*): error: undefined reference to 'vtable for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(logger.cpp.o):logger.cpp:function cv::utils::logging::internal::writeLogMessageEx(cv::utils::logging::LogLevel, char const*, char const*, int, char const*, char const*): error: undefined reference to 'VTT for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(logger.cpp.o):logger.cpp:function cv::utils::logging::internal::writeLogMessageEx(cv::utils::logging::LogLevel, char const*, char const*, int, char const*, char const*): error: undefined reference to 'vtable for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::parallel::ParallelBackendRegistry::dumpBackends() const: error: undefined reference to 'VTT for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::parallel::ParallelBackendRegistry::dumpBackends() const: error: undefined reference to 'vtable for std::__ndk1::basic_ostringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_highgui.a(highgui.cpp.o):highgui.cpp:function cv::imread(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&, int): error: undefined reference to 'vtable for std::__ndk1::basic_istringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
/home/tony/Downloads/Android/android-ndk-r21e-linux-x86_64/android-ndk-r21e/toolchains/llvm/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: the vtable symbol may be undefined because the class is missing its key function
/home/tony/Downloads/Android/HelloWorld/opencv-mobile-4.10.0-android/sdk/native/staticlibs/armeabi-v7a/libopencv_highgui.a(highgui.cpp.o):highgui.cpp:function cv::imread(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&, int): error: undefined reference to 'VTT for std::__ndk1::basic_istringstream<char, std::__ndk1::char_traits, std::__ndk1::allocator >'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/hello-world.dir/build.make:105: hello-world] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/hello-world.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
请问一下原因!谢谢。使用的工具是android-ndk-r21e-linux-x86_64
cmakelists:
`cmake_minimum_required(VERSION 3.10)
project(HelloWorld)
设置为 Android 架构
set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_SYSTEM_VERSION 21)
设置 STL 类型为静态库
#set(CMAKE_ANDROID_STL_TYPE c++_static)
设置编译选项,以确保生成的程序为 Position Independent Executable (PIE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE -pie")
set(OpenCV_DIR ${CMAKE_SOURCE_DIR}/opencv-mobile-4.10.0-android/sdk/native/jni)
find_package(OpenCV REQUIRED)
添加源文件
add_executable(hello-world src/main.cpp)
target_link_libraries(hello-world ${OpenCV_LIBS})
`
The text was updated successfully, but these errors were encountered: