undefined reference to `x264_encoder_open_125'

╄→гoц情女王★ 提交于 2019-12-04 03:26:28

This is a typical problem for people who already have x264 installed through the package management system. You can solve this in at least 2 ways:

  1. Uninstall the already existing x264 from your system, through the package management system:

    # apt-get remove x264
    

    and compile your new x264 from source

  2. Don't uninstall the x264 package, but compile your new x264 and then compile your ffmpeg, telling it to use that newly compiled x264 library, by specifying that directory where your compiled x264 library is, using the mentioned LD_LIBRARY_PATH environment variable:

    LD_LIBRARY_PATH=/path/to/my/compiled/x264/library ./configure --enable-libx264 ...
    

More info can be found on these links:

杨佩文

add the header and lib path

gcc x264_test1.c -o x264_encoder -I/usr/local/include -L/usr/local/lib -lpthread -lm -lx264

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!