Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Link with the static library of opencv by qmake on Android
Forum Updated to NodeBB v4.3 + New Features

Link with the static library of opencv by qmake on Android

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 449 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • thamT Offline
    thamT Offline
    tham
    wrote on last edited by
    #1

    As the title mentioned, what is the correct orders of the static library?

    I am using Qt5.12.3 to build an android app, struggle with the order of static libraries of opencv.

    What I have tried

    LIBS += $${OPENCV_LIB_PATH}/libopencv_highgui.a \
            $${OPENCV_LIB_PATH}/libopencv_imgproc.a \
            $${OPENCV_LIB_PATH}/libopencv_dnn.a \
            $${OPENCV_LIB_PATH}/libopencv_imgcodecs.a \
            $${OPENCV_LIB_PATH}/libopencv_core.a
    
    LIBS += $${OPENCV_3RD_PARTY_PATH}/libcpufeatures.a \
        $${OPENCV_3RD_PARTY_PATH}/liblibtiff.a \
        $${OPENCV_3RD_PARTY_PATH}/liblibjpeg-turbo.a \
        $${OPENCV_3RD_PARTY_PATH}/liblibjasper.a \
        $${OPENCV_3RD_PARTY_PATH}/liblibpng.a \    
        $${OPENCV_3RD_PARTY_PATH}/liblibwebp.a \
        $${OPENCV_3RD_PARTY_PATH}/libtbb.a \
        $${OPENCV_3RD_PARTY_PATH}/libIlmImf.a \
        $${OPENCV_3RD_PARTY_PATH}/libquirc.a \
        $${OPENCV_3RD_PARTY_PATH}/liblibprotobuf.a \
        $${OPENCV_3RD_PARTY_PATH}/libittnotify.a \
        $${OPENCV_3RD_PARTY_PATH}/libippiw.a \
        $${OPENCV_3RD_PARTY_PATH}/libippicv.a
    

    I got error messages

    ../../../3rdLibs/opencv/opencv_4.1.2-android-sdk/sdk/native/staticlibs/x86/libopencv_imgcodecs.a(loadsave.cpp.o):loadsave.cpp:function cv::imread(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char="">, std::__ndk1::allocator<char> > const&, int): error: undefined reference to 'cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)' ../../../3rdLibs/opencv/opencv_4.1.2-android-sdk/sdk/native/staticlibs/x86/libopencv_imgcodecs.a(grfmt_jpeg2000.cpp.o):grfmt_jpeg2000.cpp:function cv::Jpeg2KDecoder::readData(cv::Mat&): error: undefined reference to 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' ../../../3rdLibs/opencv/opencv_4.1.2-android-sdk/sdk/native/staticlibs/x86/libopencv_imgcodecs.a(grfmt_pfm.cpp.o):grfmt_pfm.cpp:function cv::PFMDecoder::readData(cv::Mat&): error: undefined reference to 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' ../../../3rdLibs/opencv/opencv_4.1.2-android-sdk/sdk/native/staticlibs/x86/libopencv_imgcodecs.a(grfmt_tiff.cpp.o):grfmt_tiff.cpp:function cv::TiffDecoder::readData(cv::Mat&): error: undefined reference to 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' ../../../3rdLibs/opencv/opencv_4.1.2-android-sdk/sdk/native/staticlibs/x86/libopencv_imgcodecs.a(grfmt_tiff.cpp.o):grfmt_tiff.cpp:function cv::TiffDecoder::readData(cv::Mat&): error: undefined reference to 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
    

    Tried with different orders, but none of them work, do anyone know the correct order?Thanks

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved