它没有构建,我有各种错误:
所有初始测试都失败: – 执行测试HAVE_CXX_W – 失败
也:
-- Looking for fseeko-- Looking for fseeko - not found-- Looking for unistd.h-- Looking for unistd.h - not found-- Looking for sys/types.h-- Looking for sys/types.h - not found-- Looking for stdint.h-- Looking for stdint.h - not found-- Looking for stddef.h-- Looking for stddef.h - not found
配置看起来正确:
-- General configuration for OpenCV 2.4.9 =====================================-- Version control: 2.4.5-1168-g0a42a3e---- Platform:-- Host: Darwin 12.3.0 i386-- Target: iOS-- CMake: 2.8.10-- CMake generator: Xcode-- CMake build tool: /opt/local/bin/cmakexbuild-- Xcode: 4.6.2[...]-- Media I/O:-- Zlib: build (ver 1.2.7)-- JPEG: build (ver 90)-- WEBP: NO-- PNG: build (ver 1.5.12)-- TIFF: NO-- JPEG 2000: NO-- openexr: NO---- VIDeo I/O:-- AVFoundation: YES-- QuickTime: NO-- QTKit: YES-- V4L/V4L2: NO/NO
但后来,我有第一个链接错误:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool:无法打开文件:/ Users / ant / xcode / opencv / ios / build / iPhoneOS-armv7 / 3rdparty / libjpeg / OpenCV.build/Release-iphoneos/libjpeg.build/Objects-normal/armv7/jmemansi.o
我的系统在为iOS编译OpenCV时缺少什么?
解决方法 根据3rdParty / libjpeg / CMakeLists.txt:12,jmemansi.c被排除在构建之外:if(ANDROID OR IOS) ocv_List_filterout(lib_srcs jmemansi.c)else() ocv_List_filterout(lib_srcs jmemnobs.c)endif()
但是,在世界模块构建中,不会从链接器输入中排除相应的目标文件.这可以通过从链接器输入过滤掉jmemansi.o来修复:
模块/世界/的CMakeLists.txt:84
macro(ios_include_3party_libs) foreach(l ${ARGN}) add_dependencIEs(${the_module} ${l}) string(REGEX REPLACE "<MODulE_name>" "${l}" objpath1 "${CMAKE_BINARY_DIR}/3rdparty/${l}/${objpath0}") file(GLOB sources ${CMAKE_SOURCE_DIR}/3rdparty/${l}/*.c) foreach(srcname ${sources}) if(IS_absolute "${srcname}") file(relative_PATH srcname "${CMAKE_SOURCE_DIR}/3rdparty/${l}" "${srcname}") endif() string(REPLACE ".." "__" srcname "${srcname}") get_filename_component(srcname_we ${srcname} name_WE) string(REGEX REPLACE <SRC_name_WE> "${srcname_we}" objpath2 "${objpath1}") string(REGEX REPLACE <relative_SRC_name> "${srcname}" objpath3 "${objpath2}") List(APPEND objList "\"${objpath3}\"") endforeach() # (srcname ${sources}) endforeach() ocv_List_filterout(objList jmemansi) # <<= dirty fixendmacro()总结
以上是内存溢出为你收集整理的如何为iOS构建OpenCV 2.4.9?全部内容,希望文章能够帮你解决如何为iOS构建OpenCV 2.4.9?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)