x264编译错误

错误信息

直接编译 x264

gcc -o x264  x264.o input/input.o input/timecode.o input/raw.o input/y4m.o output/raw.o output/matroska.o output/matroska_ebml.o output/flv.o output/flv_bytestream.o filters/filters.o filters/video/video.o filters/video/source.o filters/video/internal.o filters/video/resize.o filters/video/cache.o filters/video/fix_vfr_pts.o filters/video/select_every.o filters/video/crop.o filters/video/depth.o input/avs.o input/thread.o libx264.a -ldl  -m64  -lm -lpthread -ldl
/usr/bin/ld: libx264.a(cabac-a.o): relocation R_X86_64_32 against symbol `x264_cabac_range_lps' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: libx264.a(quant-a.o): relocation R_X86_64_32 against hidden symbol `x264_pb_01' can not be used when making a shared object
/usr/bin/ld: libx264.a(dct-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_8000' can not be used when making a shared object
/usr/bin/ld: libx264.a(deblock-a.o): relocation R_X86_64_32 against hidden symbol `x264_pb_1' can not be used when making a shared object
/usr/bin/ld: libx264.a(mc-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_64' can not be used when making a shared object
/usr/bin/ld: libx264.a(mc-a2.o): relocation R_X86_64_32 against hidden symbol `x264_pw_32' can not be used when making a shared object
/usr/bin/ld: libx264.a(pixel-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_00ff' can not be used when making a shared object
/usr/bin/ld: libx264.a(predict-a.o): relocation R_X86_64_32 against hidden symbol `x264_pb_1' can not be used when making a shared object
/usr/bin/ld: libx264.a(dct-64.o): relocation R_X86_64_32 against hidden symbol `x264_hsub_mul' can not be used when making a shared object
/usr/bin/ld: libx264.a(sad-a.o): relocation R_X86_64_32 against hidden symbol `x264_pw_8' can not be used when making a shared object
/usr/bin/ld: libx264.a(trellis-64.o): relocation R_X86_64_32 against symbol `x264_cabac_entropy' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:202: recipe for target 'x264' failed

解决问题

添加 --enable-pic ,支持代码动态构建

./configure --enable-pic
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值