2014-01-24 86 views
0

在我当前的项目中,我们需要在同一个项目中同时使用live555和ffmpeg库。我们能够建立并为这两个项目没有问题,运行样品,但合并这两个项目到遇到以下编译器错误项目时:使用Xcode 5编译live555和ffmpeg

Undefined symbols for architecture armv7: 
    "av_free_packet(AVPacket*)", referenced from: 
     -[MyRtspClient readFFmpegAudioFrameAndDecode] in MyRtspClient.o 
    "av_read_frame(AVFormatContext*, AVPacket*)", referenced from: 
     -[MyRtspClient readFFmpegAudioFrameAndDecode] in MyRtspClient.o 
    "av_strerror(int, char*, unsigned long)", referenced from: 
     -[MyRtspClient readFFmpegAudioFrameAndDecode] in MyRtspClient.o 
    "av_dict_set(AVDictionary**, char const*, char const*, int)", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "av_init_packet(AVPacket*)", referenced from: 
     -[MyRtspClient readFFmpegAudioFrameAndDecode] in MyRtspClient.o 
    "avcodec_register_all()", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "av_register_all()", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "av_log_set_level(int)", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "av_log(void*, int, char const*, ...)", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "avformat_alloc_context()", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "avformat_network_deinit()", referenced from: 
     -[MyRtspClient destroyFFmpegAudioStream] in MyRtspClient.o 
    "avformat_open_input(AVFormatContext**, char const*, AVInputFormat*, AVDictionary**)", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "avformat_find_stream_info(AVFormatContext*, AVDictionary**)", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "av_find_best_stream(AVFormatContext*, AVMediaType, int, int, AVCodec**, int)", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "av_dump_format(AVFormatContext*, int, char const*, int)", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "avcodec_open2(AVCodecContext*, AVCodec const*, AVDictionary**)", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "avformat_network_init()", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "av_dict_free(AVDictionary**)", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
    "avcodec_find_decoder(AVCodecID)", referenced from: 
     -[MyRtspClient initFFmpegAudioStream] in MyRtspClient.o 
ld: symbol(s) not found for architecture armv7 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

我应该包括所有必需的文件,所以我有点傻眼由此,任何建议是值得欢迎的,谢谢。

回答

0

是的,你可以很成功地结合起来。我发现最好的方法是创建一个工作空间, 合并ffmpeg和live555库。

这里有一个例子。 enter image description here

+0

谢谢,我会再试一次,也许这是我合并时做的傻事。可以肯定的是,你有没有尝试过,看看这是否适用于Xcode 5.0.x? – Kai

+0

仍然得到相同的错误信息,如果你的项目是live555&ffmpeg的简单合并,是否有可能将它上传到某处供我下载并尝试?在此先感谢 – Kai

+0

你可以直接联系我,或通过我们的Facebook页面,也许我们可以拿出一些东西https://www.facebook.com/groups/mooncatventures/ –