先说一句,linux配环境真香。
问题背景
在网上git clone了一个c++项目,用cmake ..时,报错
ld: unsupported tapi file type '!tapi-tbd' in YAML file
主流解决思路
如果以上述描述在网上搜,大概率会搜到如下解决方案:
$ brew upgrade llvm
$ brew upgrade gcc
$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install
抑或是
$ sudo xcode-select -switch /Library/Developer/CommandLineTools
原因应该是因为装的MacOS系统版本和Xcode以及配套ComanLineTools的MacOSX SDK版本不一致。具体版本对应关系参考【MAC工具】各个Xcode版本对应macOS的版本下载_小慌慌的博客-CSDN博客_xcode对应的macos版本。如果在这里发现版本不一致,那么恭喜你,至少解决了一个问题。