xcode FFmpeg报错之dyld: Library not loaded: /usr/local/ffmpeg/lib/libswresample.3.dylib

dyld: Library not loaded: /usr/local/ffmpeg/lib/libswresample.3.dylib
  Referenced from: /Users/lgerp/Library/Developer/Xcode/DerivedData/c2ffmpeg-bpzcpvvqsumnzcbthcafavlifidy/Build/Products/Debug/c2ffmpeg
  Reason: no suitable image found.  Did find:
    /usr/local/ffmpeg/lib/libswresample.3.dylib: code signature in (/usr/local/ffmpeg/lib/libswresample.3.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
    /usr/local/ffmpeg/lib/libswresample.3.8.100.dylib: code signature in (/usr/local/ffmpeg/lib/libswresample.3.8.100.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
截屏2021-03-16 上午11.07.42.png

解决方法:关掉沙盒,启用动态链接,设置Enable Hardened Runtime 为NO
如图:


截屏2021-03-16 上午11.03.50.png

你可能感兴趣的:(xcode FFmpeg报错之dyld: Library not loaded: /usr/local/ffmpeg/lib/libswresample.3.dylib)