0

我正在开发一个应用程序,通过 rtsp 从 IP 摄像机流式传输 iPhone 上的实时视频。我正在使用 live555、DecoderWrapper 和 RTSPClient 等开源项目。编译项目时出现以下错误。

   Undefined symbols for architecture i386:

   "_av_register_all", referenced from:

      +[VideoDecoder staticInitialize] in libDecoderWrapper.a(VideoDecoder.o)

  "_avcodec_init", referenced from:

      +[VideoDecoder staticInitialize] in libDecoderWrapper.a(VideoDecoder.o)

  "_av_log_set_callback", referenced from:

     +[VideoDecoder registerLogCallback:] in libDecoderWrapper.a(VideoDecoder.o)

  "_avcodec_find_decoder", referenced from:

     -[VideoDecoder initWithCodec:colorSpace:width:height:privateData:] in   libDecoderWrapper.a(VideoDecoder.o)

 "_avcodec_alloc_context", referenced from:

     -[VideoDecoder initWithCodec:colorSpace:width:height:privateData:] in     libDecoderWrapper.a(VideoDecoder.o)

  "_av_malloc", referenced from:

      -[VideoDecoder initWithCodec:colorSpace:width:height:privateData:] in libDecoderWrapper.a(VideoDecoder.o)

    -[VideoDecoder decodeFrame:] in libDecoderWrapper.a(VideoDecoder.o)

 "_avcodec_alloc_frame", referenced from:

    -[VideoDecoder initWithCodec:colorSpace:width:height:privateData:] in libDecoderWrapper.a(VideoDecoder.o)

 "_avcodec_open", referenced from:

    -[VideoDecoder initWithCodec:colorSpace:width:height:privateData:] in libDecoderWrapper.a(VideoDecoder.o)

  "_avcodec_decode_video2", referenced from:

      -[VideoDecoder decodeFrame:] in libDecoderWrapper.a(VideoDecoder.o)

  "_avpicture_get_size", referenced from:

      -[VideoDecoder decodeFrame:] in libDecoderWrapper.a(VideoDecoder.o)

  "_avpicture_fill", referenced from:

      -[VideoDecoder decodeFrame:] in libDecoderWrapper.a(VideoDecoder.o)

  "_sws_getContext", referenced from:

     -[VideoDecoder decodeFrame:] in libDecoderWrapper.a(VideoDecoder.o)

 "_sws_scale", referenced from:

     -[VideoDecoder getDecodedFrame] in libDecoderWrapper.a(VideoDecoder.o)

 "_avpicture_free", referenced from:

     -[VideoDecoder getDecodedFrame] in libDecoderWrapper.a(VideoDecoder.o)

 "_avpicture_alloc", referenced from:

     -[VideoDecoder getDecodedFrame] in libDecoderWrapper.a(VideoDecoder.o)

  "_av_picture_copy", referenced from:

     -[VideoDecoder getDecodedFrame] in libDecoderWrapper.a(VideoDecoder.o)

  "_av_free", referenced from:

     -[VideoDecoder dealloc] in libDecoderWrapper.a(VideoDecoder.o)

  "_avcodec_close", referenced from:

     -[VideoDecoder dealloc] in libDecoderWrapper.a(VideoDecoder.o)

ld: symbol(s) not found for architecture i386

collect2: ld returned 1 exit status

我已经尝试过不同的解决方案,例如检查我是否将任何框架复制到我的项目中。我已经检查过,“框架搜索路径”中没有任何内容。当我在我的项目中使用“ffmpeg”时,我也尝试为 i386 编译库,然后将这些库添加到我的项目中。但没有任何效果!有人可以帮帮我吗?如果需要,我可以提供代码详细信息。

4

1 回答 1

0

仔细检查您的编译内容,因为它应该为 arm 而不是 i386 编译。它为 i386 提供架构参考的事实让我认为它正在尝试为桌面而不是 iOS 编译。

于 2011-08-23T09:56:02.827 回答