Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to use OpenCV 3.0 on Android QT 5.6 project
Forum Update on Monday, May 27th 2025

How to use OpenCV 3.0 on Android QT 5.6 project

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 1.7k Views
  • 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.
  • L Offline
    L Offline
    lqsa
    wrote on 17 May 2016, 18:27 last edited by
    #1

    I would like to use OpenCV 3.0 on Android QT project.

    After download OpenCV Android SDK, I've tried to compile with the native interface, but always give some kind of error. Only declaring a variable gives errors:

    main.cpp:
    #include <opencv2/opencv.hpp>
    int main(int argc, char* argv[])
    {
           cv::Mat edges;
    }
    

    The pro file has the include and libs vars:

    OPENCV_PATH = D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native
    INCLUDEPATH += $${OPENCV_PATH}/jni/include
    android {
        LIBS += \
            -L"$${OPENCV_PATH}/3rdparty/libs/armeabi-v7a"\
            -L"$${OPENCV_PATH}/libs/armeabi-v7a"\
            -lopencv_core
    }
    

    but gives this errors:

    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function tbb::interface7::internal::start_for<tbb::blocked_range<int>, (anonymous namespace)::ProxyLoopBody, tbb::auto_partitioner const>::~start_for(): error: undefined reference to 'vtable for tbb::task'
    c:/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: the vtable symbol may be undefined because the class is missing its key function
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function tbb::interface7::internal::flag_task::~flag_task(): error: undefined reference to 'vtable for tbb::task'
    c:/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: the vtable symbol may be undefined because the class is missing its key function
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function tbb::interface7::internal::start_for<tbb::blocked_range<int>, (anonymous namespace)::ProxyLoopBody, tbb::auto_partitioner const>::~start_for(): error: undefined reference to 'vtable for tbb::task'
    c:/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: the vtable symbol may be undefined because the class is missing its key function
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function tbb::interface7::internal::flag_task::~flag_task(): error: undefined reference to 'vtable for tbb::task'
    c:/android/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9/../../../../arm-linux-androideabi/bin/ld.exe: the vtable symbol may be undefined because the class is missing its key function
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function tbb::task_scheduler_init::~task_scheduler_init(): error: undefined reference to 'tbb::task_scheduler_init::terminate()'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function tbb::interface7::internal::start_for<tbb::blocked_range<int>, (anonymous namespace)::ProxyLoopBody, tbb::auto_partitioner const>::execute(): error: undefined reference to 'tbb::internal::allocate_continuation_proxy::allocate(unsigned int) const'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function tbb::interface7::internal::start_for<tbb::blocked_range<int>, (anonymous namespace)::ProxyLoopBody, tbb::auto_partitioner const>::execute(): error: undefined reference to 'tbb::internal::allocate_child_proxy::allocate(unsigned int) const'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function tbb::interface7::internal::start_for<tbb::blocked_range<int>, (anonymous namespace)::ProxyLoopBody, tbb::auto_partitioner const>::execute(): error: undefined reference to 'tbb::internal::allocate_continuation_proxy::allocate(unsigned int) const'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function tbb::interface7::internal::start_for<tbb::blocked_range<int>, (anonymous namespace)::ProxyLoopBody, tbb::auto_partitioner const>::execute(): error: undefined reference to 'tbb::internal::allocate_child_proxy::allocate(unsigned int) const'
    makefile:70: recipe for target 'libOpenCVTest.so' failed
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function tbb::interface7::internal::start_for<tbb::blocked_range<int>, (anonymous namespace)::ProxyLoopBody, tbb::auto_partitioner const>::execute(): error: undefined reference to 'tbb::task_group_context::is_group_execution_cancelled() const'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double): error: undefined reference to 'tbb::task_group_context::init()'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double): error: undefined reference to 'tbb::internal::allocate_root_with_context_proxy::allocate(unsigned int) const'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double): error: undefined reference to 'tbb::internal::get_initial_auto_partitioner_divisor()'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double): error: undefined reference to 'tbb::task_group_context::~task_group_context()'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double): error: undefined reference to 'tbb::internal::allocate_root_with_context_proxy::free(tbb::task&) const'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::parallel_for_(cv::Range const&, cv::ParallelLoopBody const&, double): error: undefined reference to 'tbb::task_group_context::~task_group_context()'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::getNumThreads(): error: undefined reference to 'tbb::task_scheduler_init::default_num_threads()'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::setNumThreads(int): error: undefined reference to 'tbb::task_scheduler_init::terminate()'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function cv::setNumThreads(int): error: undefined reference to 'tbb::task_scheduler_init::initialize(int)'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:function _GLOBAL__sub_I_parallel.cpp: error: undefined reference to 'tbb::task_scheduler_init::initialize(int, unsigned int)'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:typeinfo for tbb::interface7::internal::flag_task: error: undefined reference to 'typeinfo for tbb::task'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:vtable for tbb::interface7::internal::flag_task: error: undefined reference to 'tbb::task::note_affinity(unsigned short)'
    D:/programacio/libs/OpenCV/OpenCV-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_core.a(parallel.cpp.o):parallel.cpp:typeinfo for tbb::interface7::internal::start_for<tbb::blocked_range<int>, (anonymous namespace)::ProxyLoopBody, tbb::auto_partitioner const>: error: undefined reference to 'typeinfo for tbb::task'
    collect2.exe: error: ld returned 1 exit status
    

    How can I use it?

    1 Reply Last reply
    0

    1/1

    17 May 2016, 18:27

    • Login

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