I am trying to integrate QT5.2.0 beta 1 in win7 (32b) with opencv and android for native c++ development. unfortunately I couldn't succeed. (Additionally I tried necessitas too but no luck.) Application works on desktop but when I try to compile for android kits (x86 or arm7s) I get errors related to "lopencv_highgui.a" during build such as
"C:/OpenCV-2.4.6-android-sdk/sdk/native/libs/armeabi-v7a/libopencv_highgui.a(grfmt_exr.cpp.o): In function cv::ExrDecoder::ExrDecoder()':grfmt_exr.cpp:(.text._ZN2cv10ExrDecoderC2Ev+0x82): undefined reference to
Imf::Chromaticities::Chromaticities(Imath::Vec2 const&, Imath::Vec2 const&, Imath::Vec2 const&, Imath::Vec2 const&)'"
I used a clear setup with couple of NDKs (r8b, r8e, r9) versions with
- "C:\adt-bundle-windows-x86-20130917" (managed APIs 16, 17, 18)
- "C:\apache-ant-1.9.2\bin\ant.bat"
- "C:\Program Files (x86)\Java\jdk1.7.0_45" (Set the JAVA_HOME in system env. vars.)
- "C:\OpenCV-2.4.6-android-sdk" & ""C:\OpenCV-2.4.6"
- "C:\Qt\Qt5.2.0\5.2.0-beta1\mingw48_32" (QTDIR in sys.env.vars.)
I tried following solutions
- I reordered the opencv libs in pro file as defined.
- I checked the existence of the sh.exe (not exists)
- I copied tools.jar from jdk to the "C:\Program Files (x86)\Java\jre7\lib" folder
I used Genymotion for virtual android environment with NEXUS S 4.2.2 x86 (API17) & Galaxy Nexus 4.1.1 x86 (API16).
I can compile, deploy and run some Qt examples on emulator (no Opengls and without opencv) but I couldn't get any success on simple opencv application. (PS: the application is working on desktop )
I think I need a simple running Qt opencv android example with the correct pro, user and other configurations to find the right solution and defines the errors.
Could anyone may share a working sample?