xCode 7:链接器命令失败,退出代码为 1(使用 -v 查看调用)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32173075/
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
xCode 7: linker command failed with exit code 1 (use -v to see invocation)
提问by Simen
When I run my app in the simulator, everything works fine. But when I try to run it on my device(iOS 8.4) I get this error:
当我在模拟器中运行我的应用程序时,一切正常。但是当我尝试在我的设备(iOS 8.4)上运行它时,我收到了这个错误:
ld: warning: directory not found for option '-F/Applications/Xcode- beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/Developer/Library/Frameworks'
ld: file not found: /Users/simen/Library/Developer/Xcode/DerivedData/tablesearch-doxaezkgsjeztnfkntkvhvhrjkdj/Build/Products/Debug-iphoneos/tablesearch.app/tablesearch
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Anyone know what to do? Thanks
有谁知道该怎么办?谢谢
回答by Christiaan Beekhuizen
To solve this problem:
要解决这个问题:
- Go to your project setting page
- Select your project (left side)
- Click the "Build Settings" tab
- Search "Bitcode"
- Set "Enable Bitcode" to "No"
- 转到您的项目设置页面
- 选择您的项目(左侧)
- 单击“构建设置”选项卡
- 搜索“比特码”
- 将“启用位码”设置为“否”
回答by Archie
your device version is iOS 8.4, but project target iOS 9.0 ?
Change your project target to iOS 8.4 and try again.
您的设备版本是 iOS 8.4,但项目目标是 iOS 9.0?
将您的项目目标更改为 iOS 8.4 并重试。
回答by dgatwood
Either the SDKROOT setting in your project got corrupted with extra spaces (assuming those spaces are nota typo) or something is wrong with your copy of Xcode (if those spaces area typo).
您项目中的 SDKROOT 设置被额外空格损坏(假设这些空格不是拼写错误),或者您的 Xcode 副本有问题(如果这些空格是拼写错误)。
If it isn't one of those two things, then look inside the .xcodeproj bundle and open the project.pbxproj file with a text editor and search for "Xcode- beta.app" (with those extra spaces). Find that, figure out which setting is wrong based on the name of the field that has that as part of its value, and fix the relevant setting in Xcode.
如果它不是这两件事之一,那么查看 .xcodeproj 包并使用文本编辑器打开 project.pbxproj 文件并搜索“Xcode-beta.app”(带有那些额外的空格)。找到它,根据字段的名称找出哪个设置是错误的,并在 Xcode 中修复相关设置。
回答by Simen
I created a new Project, and now everything works fine. Thanks for your help.
我创建了一个新项目,现在一切正常。谢谢你的帮助。
回答by Theofanis
For my situation the problem was a faulty plugin.
对于我的情况,问题是插件错误。
Try removing any non common plugins and try again.
尝试删除任何不常见的插件,然后重试。
回答by Paraneetharan Saravanaperumal
Try this ..
尝试这个 ..
- Go to your project setting page
- Select your project (left side)
- Click the "General" tab
- Select the app in "Host Application"
- 转到您的项目设置页面
- 选择您的项目(左侧)
- 单击“常规”选项卡
- 在“主机应用程序”中选择应用程序