我是OpenCV的新手,也是这个群体的新手。目前我正在开发一些需要OpenCV libs的Android手机ICS项目。 我的模块代码是用C编写的,在那段代码中我想调用一些OpenCV lib函数。 刚开始,我已经下载了适用于Android平台的OpenCV-2.4.0。
到目前为止我采取的步骤:
现在我收到了libopencv_core.a中的链接错误 当我从.mk文件中删除libopencv_core.a时,构建成功。 我认为libopencv_core.a依赖于其他lib来实现这些功能(gzopen,gzclose等)
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/jaguark/obj/STATIC_LIBRARIES/libopencv_core_intermediates/libopencv_core.a(persistence.cpp.o): in function icvPuts(CvFileStorage*, char const*):persistence.cpp(.text._ZL7icvPutsP13CvFileStoragePKc+0x20): error: undefined reference to 'gzputs'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/jaguark/obj/STATIC_LIBRARIES/libopencv_core_intermediates/libopencv_core.a(persistence.cpp.o): in function icvGets(CvFileStorage*, char*, int):persistence.cpp(.text._ZL7icvGetsP13CvFileStoragePci+0x26): error: undefined reference to 'gzgets'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/jaguark/obj/STATIC_LIBRARIES/libopencv_core_intermediates/libopencv_core.a(persistence.cpp.o): in function icvXMLSkipSpaces(CvFileStorage*, char*, int):persistence.cpp(.text._ZL16icvXMLSkipSpacesP13CvFileStoragePci+0x1e2): error: undefined reference to 'gzgets'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/jaguark/obj/STATIC_LIBRARIES/libopencv_core_intermediates/libopencv_core.a(persistence.cpp.o): in function icvXMLSkipSpaces(CvFileStorage*, char*, int):persistence.cpp(.text._ZL16icvXMLSkipSpacesP13CvFileStoragePci+0x208): error: undefined reference to 'gzeof'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/jaguark/obj/STATIC_LIBRARIES/libopencv_core_intermediates/libopencv_core.a(persistence.cpp.o): in function icvXMLSkipSpaces(CvFileStorage*, char*, int):persistence.cpp(.text._ZL16icvXMLSkipSpacesP13CvFileStoragePci+0x33c): error: undefined reference to 'gzeof'