由于工作需要,在Mac下编译ffmepg成静态库,然后在Xcode下封装打包成framework 或者dylib,在armv7上出现:
illegal text-relocoation (direct reference) to (global,weak) _ff_ac3_bin_to_band_tab in....
clang: error: linker command failed with exit code 1 (use -v to see invocation)错误,错误提示为文本重定向问题,后经问题定位,需要在编译ffmpeg的时候加上--enable-pic 编译选项。
看configure里面解释build position-independent code 是建立位置独立代码的意思。而出错信息正是代码重定向的问题。加上重新编译 问题解决