编译FFmpeg时 enable x265库时报下面错误,各种尝试之后通过下面两个步骤解决问题 test.c:(.text+0xcc): undefined reference to `cexp' clang90: error: linker command failed with exit code 1 (use -v to see invocation) require_pkg_config libx265 x265 x265.h x265_api_get check_pkg_config libx265 x265 x265.h x265_api_get test_pkg_config libx265 x265 x265.h x265_api_get false --exists --print-errors x265 ERROR: x265 not found using pkg-config
1.将编译x265 生成的x265.pc所在的文件夹配置成环境变量,或者在编译终端执行
export PKG_CONFIG_PATH=~/workspace/tools/x265/build_android/lib/pkgconfig
2.在配置Ffmpeg时加上下面option 如下
./configure --pkg-config="pkg-config --static" (其他配置选项)