2010-05-13 35 views
0

我正在從Ogg Vorbis文件加載聲音的程序,但無論我做什麼,XCode項目似乎都不想將libvorbisfile.a鏈接到我的程序中。我不斷收到鏈接錯誤:將libvorbisfile.dylib鏈接到Mac應用程序時出錯

"_ov_read", referenced from: 
    GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o 
    GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o 
"_ov_clear", referenced from: 
    GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o 
    GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o 
"_ov_info", referenced from: 
    GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o 
    GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o 
"_ov_open", referenced from: 
    GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o 
    GSound::GSound(GWorld*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in GSound.o 
ld: symbol(s) not found 
+0

嗨,隊友,我正在開發一個需要ogg vorbis框架來玩ogg的應用程序,你能否指出我正確的方向來成功地鏈接這些庫,在此先感謝 – 2012-03-18 12:06:15

+1

自從我開始工作以來已經有一段時間了,但如果我記得正確的話,你必須下載源代碼分發版,然後將它作爲一個框架而不是靜態或共享庫進行編譯。然後,如果您在Mac上,則可以像其他任何框架一樣將其拖入Xcode。在Linux上,只需使用您最喜歡的軟件包管理器和-lvorbisfile -logg -lvorbis進行安裝。雖然不能幫助Windows,對不起。 – computergeek6 2012-03-20 00:06:52

回答

2

我發現了這個問題。我必須將Vorbis編譯爲一個框架。

相關問題