妹岛,八臂小哪吒
最初发现一个bug:
No CMAKE_C_COMPILER could be found.
No CMAKE_CXX_COMPILER could be found.
-- The C compiler identification is unknown -- The CXX compiler identification is unknown System is unknown to cmake, create: Platform/iOS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake CMake Error at CMakeLists.txt:28 (project): No CMAKE_C_COMPILER could be found. CMake Error at CMakeLists.txt:28 (project): No CMAKE_CXX_COMPILER could be found.
因为是手动官网下载Xcode的Command Line Tools,带来了一个问题。
xcode-select --install xcode-select: error: command line tools are already installed, use "Software Update" in System Settings to install updates
其实,这个问题的本质是之前手动安装xcode command line tools,安装的位置用的是默认位置,而没有和xcode app本身安装在一起。从而导致上述错误。
默认手动安装是安装在“/Library/Developer/CommandLineTools”
而此时xcode的位置是“/Applications/Xcode.app/Contents/Developer”下;
因此为了补救与解决问题。
于是,删除手动安装的位置:
sudo rm -rf /Library/Developer/CommandLineTools
最后直接回到最初直接用命令行的方式来让xcode软件自己来安装Command Line Tools
xcode-select --install
之后根据弹窗提示安装即可。
更多问题可以参考如下两篇文章。
但是很最初的bug依然存在。于是再次进入debug状态。