0

I am now building a C++ library for iPhone with xcode 5. When I build the architecture "armv7","armv7s" and "i386", everything is fine. But when I want to build for the architecture of "arm64", I have:

 C++ Compiler:                CMAKE_CXX_COMPILER-NOTFOUND  (ver 5.1.0)

It seems that it cannot find the c++compiler. By the way, I am now using cmake toolchain to build the library, and more detailed error messages are as follows:

-- Setting up iPhoneOS toolchain
-- iPhoneOS toolchain loaded
-- The CXX compiler identification is Clang 5.1.0
-- The C compiler identification is Clang 5.1.0 
CMAKE_LIBRARY_PATH=/lib;/usr/lib
-- Looking for linux/videodev.h
CMake Error at /Applications/CMake 2.8-11.app/Contents/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed

-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
CMake Error at /Applications/CMake 2.8-11.app/Contents/share/cmake-2.8/Modules/CMakeCInformation.cmake:37 (get_filename_component):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  CMakeLists.txt:3 (PROJECT)


CMake Error: Internal CMake error, TryCompile configure of cmake failed

Any ideas? Thanks.

feelfree
  • 11,175
  • 20
  • 96
  • 167

1 Answers1

1

How are you setting the target architectures? If you specify them in CMAKE_CXX_FLAGS, try using CMAKE_OSX_ARCHITECTURES instead.

Any reason to not use Xcode 6 and CMake 3+?

fxb
  • 141
  • 3
  • I am using a python script to do the trick: https://github.com/Itseez/opencv/tree/master/platforms What I did is to go to the ios directory and then run python build_framework.py ios – feelfree Mar 13 '15 at 15:58
  • http://stackoverflow.com/questions/22328882/xcode-5-1-no-architectures-to-compile-for-only-active-arch-yes-active-arch-x I found the similar problem. – feelfree Mar 13 '15 at 16:02
  • It is not exactly the answer, but for the time being I have not found any solution yet. – feelfree Mar 16 '15 at 07:43