zoukankan      html  css  js  c++  java
  • 编译ffmpeg的时候出现ERROR: libx264 not found

    最近用Linux编译ffmpeg的时候出现了错误ERROR: libx264 not found

    查看config.log原因如下

    ./x264/libx264.a(opencl.o): In function `x264_opencl_close_library':
    opencl.c:(.text+0x572): undefined reference to `dlclose'
    ./x264/libx264.a(opencl.o): In function `x264_opencl_load_library':
    opencl.c:(.text+0x5d7): undefined reference to `dlopen'
    opencl.c:(.text+0x5f1): undefined reference to `dlsym'
    opencl.c:(.text+0x60e): undefined reference to `dlsym'
    opencl.c:(.text+0x62b): undefined reference to `dlsym'
    opencl.c:(.text+0x648): undefined reference to `dlsym'
    opencl.c:(.text+0x665): undefined reference to `dlsym'
    ./x264/libx264.a(opencl.o):opencl.c:(.text+0x682): more undefined references to `dlsym' follow
    ./x264/libx264.a(opencl.o): In function `x264_opencl_load_library':
    opencl.c:(.text+0x8fd): undefined reference to `dlclose'
    ./x264/libx264.a(opencl.o): In function `x264_opencl_lookahead_init':
    opencl.c:(.text+0x1841): undefined reference to `dlopen'
    opencl.c:(.text+0x185b): undefined reference to `dlsym'
    opencl.c:(.text+0x186d): undefined reference to `dlsym'
    opencl.c:(.text+0x1881): undefined reference to `dlsym'
    opencl.c:(.text+0x1895): undefined reference to `dlsym'
    opencl.c:(.text+0x18d4): undefined reference to `dlclose'
    collect2: ld returned 1 exit status

    查阅资料需要在ffmpeg编译的时候额外指定一下-ldl库

    例如进入ffmpeg源码目录

    ./configure --enable-static --disable-shared 
    --enable-encoder=libx264 --enable-libx264 --extra-libs=-ldl

    重点在于

    --extra-libs=-ldl
  • 相关阅读:
    ios -为什么用WKWebView加载相同的html文本,有时展示的内容却不一样。
    weex
    [Objective-C 面试简要笔记]
    [iOS 基于CoreBluetooth的蓝牙4.0通讯]
    [SVN Mac自带SVN结合新浪SAE进行代码管理]
    [SVN Mac的SVN使用]
    [iOS dispatch_once创建单例]
    [iOS UI设计笔记整理汇总]
    [iOS 视频流开发-获得视频帧处理]
    [iOS OpenCV错误解决]
  • 原文地址:https://www.cnblogs.com/yuandaozhe/p/12171514.html
Copyright © 2011-2022 走看看