2013-03-25 90 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