opencv-mobile
opencv-mobile copied to clipboard
几个undefined reference to
- 使用libopencv_imgproc.a编译时,resize报错:
opencv-mobile-4.5.1-android/sdk/native/staticlibs/arm64-v8a/libopencv_imgproc.a(resize.cpp.o): In function `(anonymous namespace)::interpolationLinear<short>::getCoeffs(int, int*, (anonymous namespace)::fixedpoint32*)':
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIsE9getCoeffsEiPiPNS_12fixedpoint32E+0x38): undefined reference to `cv::softdouble::softdouble(int)'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIsE9getCoeffsEiPiPNS_12fixedpoint32E+0x50): undefined reference to `cv::softdouble::operator+(cv::softdouble const&) const'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIsE9getCoeffsEiPiPNS_12fixedpoint32E+0x60): undefined reference to `cv::softdouble::operator*(cv::softdouble const&) const'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIsE9getCoeffsEiPiPNS_12fixedpoint32E+0x74): undefined reference to `cv::softdouble::operator-(cv::softdouble const&) const'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIsE9getCoeffsEiPiPNS_12fixedpoint32E+0x7c): undefined reference to `cvFloor(cv::softdouble const&)'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIsE9getCoeffsEiPiPNS_12fixedpoint32E+0xa8): undefined reference to `cv::softdouble::softdouble(int)'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIsE9getCoeffsEiPiPNS_12fixedpoint32E+0xb8): undefined reference to `cv::softdouble::operator-(cv::softdouble const&) const'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIsE9getCoeffsEiPiPNS_12fixedpoint32E+0xc8): undefined reference to `cv::softdouble::softdouble(int)'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIsE9getCoeffsEiPiPNS_12fixedpoint32E+0xd8): undefined reference to `cv::softdouble::operator*(cv::softdouble const&) const'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIsE9getCoeffsEiPiPNS_12fixedpoint32E+0xe0): undefined reference to `cvRound(cv::softdouble const&)'
/home/arsen/work/MIProjects/inpaint_beblid_opencv/jni/dependency/opencv-mobile-4.5.1-android/sdk/native/staticlibs/arm64-v8a/libopencv_imgproc.a(resize.cpp.o): In function `(anonymous namespace)::interpolationLinear<int>::getCoeffs(int, int*, (anonymous namespace)::fixedpoint64*)':
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIiE9getCoeffsEiPiPNS_12fixedpoint64E+0x38): undefined reference to `cv::softdouble::softdouble(int)'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIiE9getCoeffsEiPiPNS_12fixedpoint64E+0x50): undefined reference to `cv::softdouble::operator+(cv::softdouble const&) const'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIiE9getCoeffsEiPiPNS_12fixedpoint64E+0x60): undefined reference to `cv::softdouble::operator*(cv::softdouble const&) const'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIiE9getCoeffsEiPiPNS_12fixedpoint64E+0x74): undefined reference to `cv::softdouble::operator-(cv::softdouble const&) const'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIiE9getCoeffsEiPiPNS_12fixedpoint64E+0x7c): undefined reference to `cvFloor(cv::softdouble const&)'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIiE9getCoeffsEiPiPNS_12fixedpoint64E+0xa8): undefined reference to `cv::softdouble::softdouble(int)'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIiE9getCoeffsEiPiPNS_12fixedpoint64E+0xb8): undefined reference to `cv::softdouble::operator-(cv::softdouble const&) const'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIiE9getCoeffsEiPiPNS_12fixedpoint64E+0xc8): undefined reference to `cv::softdouble::softdouble(long)'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIiE9getCoeffsEiPiPNS_12fixedpoint64E+0xd8): undefined reference to `cv::softdouble::operator*(cv::softdouble const&) const'
resize.cpp:(.text._ZN12_GLOBAL__N_119interpolationLinearIiE9getCoeffsEiPiPNS_12fixedpoint64E+0xe0): undefined reference to `cvRound64(cv::softdouble const&)'
- 使用libopencv_core.a编译时,报错:
opencv-mobile-4.5.1-android/sdk/native/staticlibs/arm64-v8a/libopencv_core.a(parallel.cpp.o): In function `.omp_outlined.':
parallel.cpp:(.text..omp_outlined.+0x6c): undefined reference to `__kmpc_dispatch_init_4'
parallel.cpp:(.text..omp_outlined.+0x88): undefined reference to `__kmpc_dispatch_next_4'
parallel.cpp:(.text..omp_outlined.+0xb4): undefined reference to `__kmpc_dispatch_next_4'
opencv-mobile-4.5.1-android/sdk/native/staticlibs/arm64-v8a/libopencv_core.a(system.cpp.o): In function `cv::HWFeatures::initialize()':
system.cpp:(.text._ZN2cv10HWFeatures10initializeEv[_ZN2cv10HWFeatures10initializeEv]+0x2bc): undefined reference to `stderr'
system.cpp:(.text._ZN2cv10HWFeatures10initializeEv[_ZN2cv10HWFeatures10initializeEv]+0x2c0): undefined reference to `stderr'
@nihui
p.s. 使用的是最新release的: https://github.com/nihui/opencv-mobile/releases/download/v9/opencv-mobile-4.5.1-android.zip @nihui
ndk版本用 r21d android api version 用 24 或以上
ndk版本用 r21d android api version 用 24 或以上
你好 !
以及如何为版本 ndk21构建 ?
@nihui Linux aarch64 编译命令,g++ .cpp -I libopencv.a -o exe 的确会出现好多 opencv 里面的 undefined