xcode clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18678045/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
clang: error: linker command failed with exit code 1 (use -v to see invocation)
提问by Ilan Kleiman
I have developed an iOS Application with Xcode 5, release 6. I have successfully run the application on the iOS simulator and on my iPhone 5 (iOS7 beta6)
我已经使用 Xcode 5, release 6 开发了一个 iOS 应用程序。我已经在 iOS 模拟器和我的 iPhone 5 (iOS7 beta6) 上成功运行了该应用程序
I'm following Apple's tutorial on how to release the app onto the app store (bit complicated).
我正在关注 Apple 的关于如何将应用程序发布到应用程序商店的教程(有点复杂)。
I've gotten to the point where they want me to "Archive" my project. Everytime I attempt to archive it, it gives me this error:
我已经到了他们希望我“归档”我的项目的地步。每次我尝试归档它时,它都会给我这个错误:
ld: file not found: /Users/name/Library/Developer/Xcode/DerivedData/Mobile-cwvgezbobyhhzzccadgoqizqcmfd/Build/Intermediates/ArchiveIntermediates/trial/InstallationBuildProductsLocation/Applications/libCordova.a clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld:文件未找到:/Users/name/Library/Developer/Xcode/DerivedData/Mobile-cwvgezbobyhhzzccadgoqizqcmfd/Build/Intermediates/ArchiveIntermediates/trial/InstallationBuildProductsLocation/Applications/libCordova.a clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
回答by scollaco
Well, since you are using Xcode 5, Apple says on the member center:
好吧,既然你用的是 Xcode 5,苹果在会员中心说:
"Xcode 5 Developer Preview cannot be used to submit apps to the iOS or Mac App Store. Continue to use the publicly released version of Xcode to compile and submit apps to the App Stores."
“Xcode 5 Developer Preview 不能用于向 iOS 或 Mac App Store 提交应用程序。继续使用公开发布的 Xcode 版本编译应用程序并将其提交到 App Store。”
But I will show some suggestions anyway:
但无论如何我都会提出一些建议:
With Xcode, click on your project's icon on the left, select the tab Build Phases > Compile Sourcesand click on the "+" to check if there is some file
.m
to be imported.Check if you imported all the frameworks you are using to your project.
Go to Build Settingsand look for Architecturesand set
armv7
instead ofarmv6
andarmv7s
.
使用 Xcode,单击左侧的项目图标,选择选项卡Build Phases > Compile Sources,然后单击“ +”以检查是否有
.m
要导入的文件。检查您是否将所有正在使用的框架导入到您的项目中。
转到Build Settings并查找Architecturesand set
armv7
而不是armv6
andarmv7s
。
I hope this helps.
我希望这有帮助。