xcode - 让 OpenCV 在 Iphone 上工作

标签 xcode ios opencv

我试着关注 these instructions让 OpenCV 在我的 MAC MINI 上编译,但在第 6 步失败:

../opencv_cmake.sh 模拟器../OpenCV-2.1.0

我遇到了这些错误,但我无法理解。有什么线索吗?

Starting cmake...
Target SDK            = iPhoneSimulator
iOS SDK Version       = 4.1
iOS Deployment Target = 3.0
OpenCV Root           = ../OpenCV-2.1.0
OpenCV Install Prefix = /Users/haoest/Development/iphone_opencv_test/build_simulator/../opencv_simulator

-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc
-- Check for working C compiler: /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -- broken
CMake Error at /Applications/CMake 2.8-4.app/Contents/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler
  "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc" is
  not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /Users/haoest/Development/iphone_opencv_test/build_simulator/CMakeFiles/CMakeTmp



  Run Build Command:/usr/bin/make "cmTryCompileExec/fast"

  /usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
  CMakeFiles/cmTryCompileExec.dir/build

  "/Applications/CMake 2.8-4.app/Contents/bin/cmake" -E cmake_progress_report
  /Users/haoest/Development/iphone_opencv_test/build_simulator/CMakeFiles/CMakeTmp/CMakeFiles
  1

  Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o

  /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc
  -isysroot
  /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk
  -mmacosx-version-min="10.6" -o
  CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
  /Users/haoest/Development/iphone_opencv_test/build_simulator/CMakeFiles/CMakeTmp/testCCompiler.c


  Linking C executable cmTryCompileExec

  "/Applications/CMake 2.8-4.app/Contents/bin/cmake" -E cmake_link_script
  CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1

  /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc
  -isysroot
  /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk
  -mmacosx-version-min="10.6" -Wl,-search_paths_first
  -Wl,-headerpad_max_install_names
  CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -o cmTryCompileExec

  ld: warning: in
  /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/usr/lib/libSystem.dylib,
  file was built for i386 which is not the architecture being linked (x86_64)

  Undefined symbols:

    "_exit", referenced from:
        start in crt1.10.6.o

  ld: symbol(s) not found

  collect2: ld returned 1 exit status

  make[1]: *** [cmTryCompileExec] Error 1

  make: *** [cmTryCompileExec/fast] Error 2





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:39 (project)

-- 配置不完整,出现错误!

最佳答案

关于xcode - 让 OpenCV 在 Iphone 上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5114406/

相关文章:

iphone - 如何在 self.view 的属性上设置 lldb 观察点?

iphone - 空项目错误 : "this class is not key value coding-compliant for the viewcontroller."

xcode - Clang Format 正在删除我的空行上的所有缩进空格

android - 如果更改相机权限,应用程序将重新启动

opencv - 基于4个共面点用单应矩阵计算相机位姿

ios - 我不再使用的库在启动时使应用程序崩溃。如何彻底去除? Xcode/swift

ios - 为通用iOS应用制作图像需要什么分辨率?

ios - 在后台继续 NSURLConnection 请求的最合适方法

c++ - 汇编程序消息:错误:拇指条件指令应放在IT block 中— `strexeq r1,r2,[r4]'

image - 使用opencv仅去除图像中的黑点