背景
ios
第一次使用xcode
编译ffmpeg arm64报错,当然,库都不重要。这个第一次,新电脑
报错
xcrun -sdk iphoneos clang is unable to create an executable file.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
说的我都懵了, 直接去config.log
SDK “iphoneos” cannot be located #这里
missing required architecture arm64 in file /usr/lib/libSystem.dylib (2 slices)
这里只能给你们看看部分log,因为log已经没了。只能浏览器历史记录找了。
解决
第一句 ,提示xcode 找不到
第二句,libSystem.dylib 说缺少arm64,上了11的xcode怎么可能没有
~$ xcodebuild -version
#还真链接不到,报这个错误的原因是xcode-select不在默认的路径
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer
~$ xcode-select --print-path
/Library/Developer/CommandLineTools
#这里指定到咱们下的xcode上
~$ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/
#验证一下
~$ xcode-select --print-path
#没有错
/Applications/Xcode.app/Contents/Developer
~$ xcodebuild -version
Xcode 11.3.1
Build version 11C504
输出了xcode version 就链接成功了,我觉得此刻应该是搞定问题了,再重新编译即可