zoukankan      html  css  js  c++  java
  • Mac下编译ffmpeg出现“ERROR: x265 not found using pkg-config”

    x265已经编译成功,但是ffmpeg/configure出现错误

      ERROR: x265 not found using pkg-config

    看了一下config.log,出了一坨“Undefined symbols for architecture x86_64” 的错误

    Undefined symbols for architecture x86_64:
      "vtable for __cxxabiv1::__class_type_info", referenced from:
          ...
      "vtable for __cxxabiv1::__si_class_type_info", referenced from:
          ...
      "vtable for __cxxabiv1::__vmi_class_type_info", referenced from:
        ...
      ...
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    ERROR: x265 not found using pkg-config

    google 了半天,有些帖子说在x265.pc的“Libs.private:”里添加“-lstdc++”能解决。

    - Libs.private: -lto_library -lc++ -ldl
    + Libs.private: -lto_library -lc++ -lstdc++ -ldl

    试了一下,确实可以。

    原来是苹果对应GNU的libstdc++搞了个自己的libc++,导致Mac下GCC链接出了问题。自动化编译时在脚本里添加一行

    export LDFLAGS="${LDFLAGS} -lstdc++"

    就好。MAC和linux下都能顺利编过。因为Linux上本来就是使用的libstdc++。

  • 相关阅读:
    Metasploit的使用命令_1
    Kali Linux -系统定制
    20200522随笔
    阿里大于接口的问题
    根据一篇文章学习逻辑漏洞
    flask注册蓝图报错
    python 生成验证码
    flask-mail 机制
    对巡风vulscan的理解
    “百度杯” YeSerCMS
  • 原文地址:https://www.cnblogs.com/jogh/p/6656992.html
Copyright © 2011-2022 走看看