2013-03-25 42 views
2

我使用echoprint API進行最近3個月的歌曲搜索。但突然間,它開始給我以下的錯誤。我已經在將該API添加到我的項目&時面臨許多問題,現在它開始給我鏈接器錯誤。它以前爲我工作。 錯誤是這樣的:iOS中echoprint的鏈接器錯誤

"Codegen::Codegen(float const*, unsigned int, int)", referenced from: _GetPCMFromFile in File.o

clang: error: linker command failed with exit code 1 (use -v to see invocation)

ld: symbol(s) not found for architecture i386

ld: warning: directory not found for option '-L-L/Users/prajaktakulkarni/Downloads/echoprint-codegen-4.12 2/src/echoprint-codegen-ios/build/Release-iphoneos' ld: warning: ignoring file /Users/prajaktakulkarni/Documents/Instajam/libechoprint-codegen-ios.a, missing required architecture i386 in file /Users/prajaktakulkarni/Documents/Instajam/libechoprint-codegen-ios.a (2 slices) Undefined symbols for architecture i386: "Codegen::Codegen(float const*, unsigned int, int)", referenced from: _GetPCMFromFile in File.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

+0

它看起來像你試圖在模擬器上運行它。如果你在設備上運行它,它會工作嗎? – 2013-03-25 07:29:40

+0

哦!!!!感謝詹姆斯記住這件事....現在它適合我:) – 2013-03-25 07:34:42

回答

2

錯誤消息是說,靜態庫libechoprint-CODEGEN-ios.a尚未建成爲i386架構 - 這是由模擬器中使用的架構。

你可以找出哪些架構靜態庫已經爲在終端中運行下面的代碼已建成:

lipo -info ~/Documents/Instajam/libechoprint-codegen-ios.a 

它可能會告訴你,它是建立在對ARMv7和armv7s。在編寫本文時,這將支持除最老的iOS設備以外的所有設備。

您可以構建libechoprint-codegen-ios.a以在模擬器上運行。這是一個很好的stackoverflow後,如果你有興趣這樣做:Build fat static library (device + simulator) using Xcode and SDK 4+

最簡單的選擇將只是插入手機,而不用擔心建立一個胖的靜態庫。 :D

+0

在與靜態庫掙扎之後,我最終付了99美元給蘋果公司在我的iPod Touch上運行,現在當我嘗試運行它時,我得到了'身份'iPhone開發者:Brian Whitman(XXXXXXXXX)'與您的鑰匙串中的任何有效,未過期的證書/私鑰對都不匹配。這個布萊恩傢伙是ECHOnest的共同創始人或類似的東西......任何我可能做錯的事情? – 2013-07-10 12:30:21

+1

@AvielGross應按照下列步驟進行:http://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/YourFirstAppStoreSubmission/ProvisionYourDevicesforDevelopment/ProvisionYourDevicesforDevelopment.html – 2013-07-10 12:44:01

+0

感謝它的幫助下,現在我堅持了一些嘗試編譯時出現其他錯誤:'CodeSign er error:權利文件'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Entitlements.plist'丟失',之後:'Command/bin/sh失敗退出碼65'。有任何想法嗎? – 2013-07-11 05:50:19