我在引入ffmpeg动态库的时候报错了

来源:6-7 Mac App中引入ffmpeg库

qq_不弃_6

2025-02-20

dyld[53219]: Library not loaded: '/usr/local/opt/ffmpeg/lib/libavfilter.8.dylib’
Referenced from: '/Users/wangxingxin/Library/Developer/Xcode/DerivedData/FFMPEG_TEST-bkhlndljlolxcbhavjhuezignwyv/Build/Products/Debug/FFMPEG_TEST.app/Contents/MacOS/FFMPEG_TEST’
Reason: tried: ‘/Users/wangxingxin/Library/Developer/Xcode/DerivedData/FFMPEG_TEST-bkhlndljlolxcbhavjhuezignwyv/Build/Products/Debug/libavfilter.8.dylib’ (no such file), ‘/usr/lib/system/introspection/libavfilter.8.dylib’ (no such file), ‘/usr/local/opt/ffmpeg/lib/libavfilter.8.dylib’ (code signature in <25282342-F318-3C04-8E51-E92F4FA5F17B> ‘/usr/local/Cellar/ffmpeg/5.0/lib/libavfilter.8.24.100.dylib’ not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), ‘/usr/local/lib/libavfilter.8.dylib’ (code signature in <25282342-F318-3C04-8E51-E92F4FA5F17B> ‘/usr/local/Cellar/ffmpeg/5.0/lib/libavfilter.8.24.100.dylib’ not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), ‘/usr/lib/libavfilter.8.dylib’ (no such file), ‘/Users/wangxingxin/Library/Developer/Xcode/DerivedData/FFMPEG_TEST-bkhlndljlolxcbhavjhuezignwyv/Build/Products/Debug/libavfilter.8.24.100.dylib’ (no such file), ‘/usr/lib/system/introspection/libavfilter.8.24.100.dylib’ (no such file), ‘/usr/local/Cellar/ffmpeg/5.0/lib/libavfilter.8.24.100.dylib’ (code signature in <25282342-F318-3C04-8E51-E92F4FA5F17B> ‘/usr/local/Cellar/ffmpeg/5.0/lib/libavfilter.8.24.100.dylib’ not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), ‘/usr/local/lib/libavfilter.8.24.100.dylib’ (code signature in <25282342-F318-3C04-8E51-E92F4FA5F17B> ‘/usr/local/Cellar/ffmpeg/5.0/lib/libavfilter.8.24.100.dylib’ not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?)), ‘/usr/lib/libavfilter.8.24.100.dylib’ (no such file)

请问这是什么原因

写回答

1回答

李超

2025-02-20

这类问题之前回答过,首先你的代码必须是在本机下编译的;其次Xcode 上有一个设置叫 signing & capability,它里边有一项叫 hardended Runtime 的配置,将它删除应该就可以了

1
2
李超
回复
qq_不弃_6
OK,解决了就行
2025-02-20
共2条回复

音视频小白系统入门课 音视频基础+ffmpeg原理

掌握音视频采集、编解码、RTMP传输协议等核心基础

2317 学习 · 813 问题

查看课程