gpt4 book ai didi

ffmpeg - 编译 libx264 时出错 : Undefined symbols for architecture x86_64

转载 作者:行者123 更新时间:2023-12-04 23:05:33 24 4
gpt4 key购买 nike

我已经安装了 ffmpeg,我正在尝试编译 libx264,但一直出现错误。我从搜索中找到的大多数结果都是关于编译 ffmpeg 或使用 libx264 配置它的问题,但我似乎什至无法编译 libx264。

这是错误:

Undefined symbols for architecture x86_64:
"_CFDataCreate", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
_vda_h264_end_frame in libavcodec.a(vda_h264.o)
"_CFDictionaryCreateMutable", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_CFDictionarySetValue", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_CFNumberCreate", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_CFRelease", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
_vda_h264_end_frame in libavcodec.a(vda_h264.o)
"_CVPixelBufferGetBaseAddress", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferGetBaseAddressOfPlane", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferGetBytesPerRow", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferGetBytesPerRowOfPlane", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferGetPixelFormatType", referenced from:
_vda_decoder_callback in libavcodec.a(vda_h264.o)
"_CVPixelBufferGetPlaneCount", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferIsPlanar", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferLockBaseAddress", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
"_CVPixelBufferRelease", referenced from:
_release_buffer in libavcodec.a(vda_h264_dec.o)
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_vda_h264_uninit in libavcodec.a(vda_h264.o)
_ff_vda_output_callback in libavcodec.a(vda_h264.o)
_release_buffer in libavcodec.a(vda_h264.o)
_vda_h264_release_buffer in libavcodec.a(vda_h264.o)
"_CVPixelBufferRetain", referenced from:
_vdadec_decode in libavcodec.a(vda_h264_dec.o)
_vda_decoder_callback in libavcodec.a(vda_h264.o)
_ff_vda_output_callback in libavcodec.a(vda_h264.o)
"_CVPixelBufferUnlockBaseAddress", referenced from:
_release_buffer in libavcodec.a(vda_h264_dec.o)
"_VDADecoderCreate", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_VDADecoderDecode", referenced from:
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_vda_h264_end_frame in libavcodec.a(vda_h264.o)
"_VDADecoderDestroy", referenced from:
_ff_vda_destroy_decoder in libavcodec.a(vda_h264.o)
"_VDADecoderFlush", referenced from:
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_vda_h264_end_frame in libavcodec.a(vda_h264.o)
"_iconv", referenced from:
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_iconv_close", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_iconv_open", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_kCFAllocatorDefault", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_vda_old_h264_end_frame in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
_vda_h264_end_frame in libavcodec.a(vda_h264.o)
"_kCFCoreFoundationVersionNumber", referenced from:
_vdadec_init in libavcodec.a(vda_h264_dec.o)
"_kCFTypeDictionaryKeyCallBacks", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kCFTypeDictionaryValueCallBacks", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kCVPixelBufferIOSurfacePropertiesKey", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kCVPixelBufferPixelFormatTypeKey", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kVDADecoderConfiguration_Height", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kVDADecoderConfiguration_SourceFormat", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kVDADecoderConfiguration_Width", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_kVDADecoderConfiguration_avcCData", referenced from:
_ff_vda_create_decoder in libavcodec.a(vda_h264.o)
_ff_vda_default_init in libavcodec.a(vda_h264.o)
"_swr_alloc", referenced from:
_opus_decode_init in libavcodec.a(opusdec.o)
"_swr_close", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
_opus_decode_flush in libavcodec.a(opusdec.o)
"_swr_convert", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
"_swr_free", referenced from:
_opus_decode_close in libavcodec.a(opusdec.o)
"_swr_init", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
"_swr_is_initialized", referenced from:
_opus_decode_packet in libavcodec.a(opusdec.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [x264] Error 1

更新:我通过使用自制软件安装带有 libx264 的 ffmpeg 来解决这个问题。

最佳答案

您需要将以下框架添加到您的项目中:VideoDecodeAcceleration.framework、CoreVideo.framework、CoreFoundation.framework

要添加它们,请选择您的目标,转到“Build Phases -> Link Binary With Libraries”,单击 + 按钮并选择您的框架。之后一切都应该编译。

关于ffmpeg - 编译 libx264 时出错 : Undefined symbols for architecture x86_64,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28666178/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com