解决集成 FFmpeg 时编译报错问题

原文链接:https://debugly.cn/2019/02/15-integration-ffmpeg-error.html

 

死记这些没一点用,反而会浪费脑细胞,只要找到通用解决方法才好,你可以问度娘,但是度娘也不知道怎么办?

下面就来看下出错信息吧,比如:

Undefined symbols for architecture x86_64:
  "_SSLClose", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
      _tls_close in libavformat.a(tls_securetransport.o)
  "_SSLCopyPeerTrust", 

可以看到是因为 _SSLClose 这个符号未定义导致了出错,而这个符号是在 tls_open 这个方法里使用的。tls_open 方法就在 libavformat 库里 tls_securetransport.c 文件中,因此找到 tls_securetransport.c 这个文件,你会发现:

#include <Security/Security.h>
#include <Security/SecureTransport.h>

所以就知道了,FFmpeg 需要 Security.framework 这个框架。

 

Undefined symbols for architecture x86_64:
  "_SSLClose", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
      _tls_close in libavformat.a(tls_securetransport.o)
  "_SSLCopyPeerTrust", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
  "_SSLCreateContext", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
  "_SSLHandshake", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
  "_SSLRead", referenced from:
      _tls_read in libavformat.a(tls_securetransport.o)
  "_SSLSetCertificate", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
  "_SSLSetConnection", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
  "_SSLSetIOFuncs", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
  "_SSLSetPeerDomainName", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
  "_SSLSetSessionOption", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
  "_SSLWrite", referenced from:
      _tls_write in libavformat.a(tls_securetransport.o)
  "_SecIdentityCreate", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
  "_SecItemImport", referenced from:
      _import_pem in libavformat.a(tls_securetransport.o)
  "_SecTrustEvaluate", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
  "_SecTrustSetAnchorCertificates", referenced from:
      _tls_open in libavformat.a(tls_securetransport.o)
ld: symbol(s) not found for architecture x86_64
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值