2011-08-23 68 views
0

我在一個應用程序的工作未定義的符號,從IP攝像機通過RTSP流的iPhone上的視頻直播。我正在使用live555,DecoderWrapper和RTSPClient等開源項目。編譯我的項目時出現以下錯誤。編譯錯誤:i386硬件架構

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的庫,然後將這些庫添加到我的項目中。但沒有任何作品!有人可以幫幫我嗎?如有需要,我可以提供代碼細節。

+0

看看你是否已經錯過了加任何框架 – EmptyStack

+0

@EmptyStackI已經檢查和複查,我不認爲我失去了一個框架。 – Anila

回答

0

仔細檢查你的編譯的東西,它應該編譯生成ARM不I386。它爲i386帶來架構引用的事實讓我覺得它正在嘗試爲桌面而不是iOS編譯。

+0

其實我想先建立它的模擬器,我試了一下,因爲在一些其他職位有人建議對模擬器這樣做。 – Anila

+0

啊我的壞對不起,如果你看看[這裏](http://blog.iosplace.com/?p=20)有一個如何在建設庫,包含兩個手臂和i386所需要的符號脂肪的人,應該幫助你更進一步。 –

+0

非常感謝鏈接。我會嘗試它,並希望我的概率將得到解決。 – Anila

相關問題