iOS 开发之编译ffmpeg (报错分析1)

本文介绍了在iOS开发中编译ffmpeg时遇到的错误:'xcrun -sdk iphoneos clang is unable to create an executable file.'。错误原因是由于Mac上安装了多个Xcode版本导致的配置问题。解决方法是通过终端使用'sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer/'命令切换到Xcode的正确路径。执行此命令后,再次运行编译脚本,问题得到解决。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

iOS 开发之编译ffmpeg (报错分析1)

  1. ffmpeg 自动下载及编译

目前用的最多的是 :build-ffmpeg.sh

下载地址:https://github.com/kewlbear/FFmpeg-iOS-build-script.git

  1. 执行 build-ffmpeg.sh

cd 到 build-ffmpeg.所在的目录下,然后执行:

./build-ffmpeg.sh

这个时候如果你的Mac曾经安装过多个版本的Xcode ,执行./build-ffmpeg.sh 时可能会报错:

building 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

ffmpeg-user@ffmpeg.org mailing list or IRC #ff

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值