OpenCV で Qt Android アプリを作成したいと考えています。Ubuntu 12.04 (64 ビット) で Necessitas Qt Creator と OpenCV 2.4.0 Android バイナリ パッケージを使用しています。現時点では、OpenCV Mat オブジェクトを作成するだけです。
しかし、プロジェクトをコンパイルしているときに、tbb 関数の「未定義の参照」エラーが発生します。
> /home/kolbe/src/android-sdk-linux/OpenCV-2.4.0/libs/armeabi-v7a/libopencv_core.a(stat.cpp.o):-1: In function tbb::interface6::internal::start_for<tbb::blocked_range<int>, cv::BatchDistInvoker, tbb::auto_partitioner>::execute():
stat.cpp:-1: error: undefined reference to tbb::internal::allocate_continuation_proxy::allocate(unsigned int) const
stat.cpp:-1: error: undefined reference to tbb::internal::allocate_continuation_proxy::allocate(unsigned int) const
...
*.pro / qmake ファイルに OpenCV ライブラリ (libtbb.a も) を含めています。
ANDROID_OPENCV = /home/kolbe/src/android-sdk-linux/OpenCV-2.4.0
LIBS += \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_calib3d.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_flann.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_objdetect.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_contrib.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_video.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_ml.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_legacy.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_highgui.a \
$$ANDROID_OPENCV/share/OpenCV/3rdparty/libs/armeabi-v7a/liblibjpeg.a \
$$ANDROID_OPENCV/share/OpenCV/3rdparty/libs/armeabi-v7a/liblibpng.a \
$$ANDROID_OPENCV/share/OpenCV/3rdparty/libs/armeabi-v7a/liblibtiff.a \
$$ANDROID_OPENCV/share/OpenCV/3rdparty/libs/armeabi-v7a/liblibjasper.a \
$$ANDROID_OPENCV/share/OpenCV/3rdparty/libs/armeabi-v7a/libtbb.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_ts.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_imgproc.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_core.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_androidcamera.a \
$$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_features2d.a
INCLUDEPATH += $$ANDROID_OPENCV/include/opencv/
INCLUDEPATH += $$ANDROID_OPENCV/include/opencv2/
INCLUDEPATH += $$ANDROID_OPENCV/include/
CONFIG+=link_pkgconfig PKGCONFIG+=opencv
OpenCV が tbb 関数を見つけられないのはなぜですか? ありがとう!