jmpews / Dobby

a lightweight, multi-platform, multi-architecture hook framework.
Apache License 2.0
4k stars 833 forks source link

请教一下大神关于在macos上编译的疑惑 #113

Closed ckcfcc closed 3 years ago

ckcfcc commented 3 years ago

gcc g++ clang make 系统中都是已经安装好的,命令行也都能访问,但是执行ios (arm64) 编译时 第一步就卡住了

按照文档 调用 cmake .. \ -DCMAKE_TOOLCHAIN_FILE=cmake/ios.toolchain.cmake \ -DPLATFORM=OS64 -DARCHS="arm64" -DCMAKE_SYSTEM_PROCESSOR=arm64 \ -DENABLE_BITCODE=0 -DENABLE_ARC=0 -DENABLE_VISIBILITY=1 -DDEPLOYMENT_TARGET=9.3 时出现提示说编译器没有指定,请问一下需要在执行编译前手动在CMakeList.txt里去更改么?

具体出错信息如下: -- Merging integrated CMake 3.14+ iOS,tvOS,watchOS,macOS toolchain(s) with this toolchain! -- Building with Xcode version: -- Configuring iphoneos build for platform: OS64, architecture(s): arm64 -- Using manually set SDK: for platform: OS64 CMake Error at cmake/ios.toolchain.cmake:379 (get_filename_component): get_filename_component called with incorrect number of arguments Call Stack (most recent call first): /usr/local/Cellar/cmake/3.16.4/share/cmake/Modules/CMakeDetermineSystem.cmake:93 (include) CMakeLists.txt:2 (project)

CMake Error at cmake/ios.toolchain.cmake:380 (get_filename_component): get_filename_component called with incorrect number of arguments Call Stack (most recent call first): /usr/local/Cellar/cmake/3.16.4/share/cmake/Modules/CMakeDetermineSystem.cmake:93 (include) CMakeLists.txt:2 (project)

CMake Error at cmake/ios.toolchain.cmake:383 (message): Invalid CMAKE_DEVELOPER_ROOT: does not exist. Call Stack (most recent call first): /usr/local/Cellar/cmake/3.16.4/share/cmake/Modules/CMakeDetermineSystem.cmake:93 (include) CMakeLists.txt:2 (project)

CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred!

jmpews commented 3 years ago

没有 detect 到 xcode.

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer 试下