模拟器运行报错:ld: symbol(s) not found for architecture x86_64

Posted tufei7

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了模拟器运行报错:ld: symbol(s) not found for architecture x86_64相关的知识,希望对你有一定的参考价值。

模拟器运行报错:

报错信息如下:

Undefined symbols for architecture x86_64:
  "_x264_encoder_open_142", referenced from:
      H264_Open_uni(int, int, int, int, int) in libPlayerSDKLib.a(ffcodec_uni.o)
      H264_Open(int, int, int, int, int) in RtSDK(ffcodec.o)
  "_x264_encoder_headers", referenced from:
      H264_Open_uni(int, int, int, int, int) in libPlayerSDKLib.a(ffcodec_uni.o)
      H264_Open(int, int, int, int, int) in RtSDK(ffcodec.o)
  "_x264_param_default", referenced from:
      H264_Open_uni(int, int, int, int, int) in libPlayerSDKLib.a(ffcodec_uni.o)
      H264_Open(int, int, int, int, int) in RtSDK(ffcodec.o)
  "_x264_param_apply_profile", referenced from:
      H264_Open_uni(int, int, int, int, int) in libPlayerSDKLib.a(ffcodec_uni.o)
      H264_Open(int, int, int, int, int) in RtSDK(ffcodec.o)
  "_x264_encoder_encode", referenced from:
      H264_EncodeFrame_uni(H264_Context*, unsigned char*, unsigned int, unsigned char**, unsigned int*) in libPlayerSDKLib.a(ffcodec_uni.o)
      H264_EncodeFrame(H264_Context*, unsigned char*, unsigned int, unsigned char**, unsigned int*) in RtSDK(ffcodec.o)
  "_x264_encoder_close", referenced from:
      H264_Open_uni(int, int, int, int, int) in libPlayerSDKLib.a(ffcodec_uni.o)
      H264_Close_uni(H264_Context*) in libPlayerSDKLib.a(ffcodec_uni.o)
      H264_Open(int, int, int, int, int) in RtSDK(ffcodec.o)
      H264_Close(H264_Context*) in RtSDK(ffcodec.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

libPlayerSDKLib这个库有问题

这个库包含在ffmpeg的库里面,

把整个ffmpeg库替换就好了。

技术分享图片

 

以上是关于模拟器运行报错:ld: symbol(s) not found for architecture x86_64的主要内容,如果未能解决你的问题,请参考以下文章

缺少链接库报错:ld: symbol(s) not found for architecture x86_64

[MERFISH报错合集]Error2 ld/ symbol(s) not found for architecture x86_64

坑爹的 ld: symbol(s) not found for architecture armv7

ld: symbol(s) not found for architecture armv7

MAC编译lame ld: symbol(s) not found for architecture x86_64/_lame_init_old“, referenced from

ios-ld: 1 duplicate symbol for architecture arm64报错处理