我在尝试构建我的程序时遇到问题,该程序使用 C++ 类与 FFmpeg 对象进行 dela:
Undefined symbols for architecture armv7:
"__Z13avcodec_open2P14AVCodecContextP7AVCodecPP12AVDictionary", referenced from:
__Z10openStreamPKcb in RTPReader.o
"__Z21avcodec_decode_audio4P14AVCodecContextP7AVFramePiP8AVPacket", referenced from:
__Z13getStreamDataRPhRi in RTPReader.o
"__Z20avformat_close_inputPP15AVFormatContext", referenced from:
__Z11closeStreamv in RTPReader.o
"__Z21avformat_network_initv", referenced from:
__Z10openStreamPKcb in RTPReader.o
"__Z26avcodec_get_frame_defaultsP7AVFrame", referenced from:
__Z13getStreamDataRPhRi in RTPReader.o
"__Z15av_register_allv", referenced from:
__Z10openStreamPKcb in RTPReader.o
"__Z19av_find_best_streamP15AVFormatContext11AVMediaTypeiiPP7AVCodeci", referenced from:
__Z10openStreamPKcb in RTPReader.o
"__Z14av_free_packetP8AVPacket", referenced from:
__Z13getStreamDataRPhRi in RTPReader.o
__Z11closeStreamv in RTPReader.o
"__Z6av_logPviPKcz", referenced from:
__Z10openStreamPKcb in RTPReader.o
__Z13getStreamDataRPhRi in RTPReader.o
"__Z19avformat_open_inputPP15AVFormatContextPKcP13AVInputFormatPP12AVDictionary", referenced from:
__Z10openStreamPKcb in RTPReader.o
"__Z26av_samples_get_buffer_sizePiii14AVSampleFormati", referenced from:
__Z13getStreamDataRPhRi in RTPReader.o
"__Z19avcodec_alloc_framev", referenced from:
__Z13getStreamDataRPhRi in RTPReader.o
"__Z25avformat_find_stream_infoP15AVFormatContextPP12AVDictionary", referenced from:
__Z10openStreamPKcb in RTPReader.o
"__Z13av_read_frameP15AVFormatContextP8AVPacket", referenced from:
__Z13getStreamDataRPhRi in RTPReader.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
不知何故,它为我所有的 C++ 方法添加了前缀 _Z##,我不知道为什么,有人可以指导一下问题可能是什么吗?提前谢谢。