xcode “警告:找不到选项的目录”在构建时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32040038/
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
'warning: directory not found for option' error on build
提问by user3746428
All of a sudden my app has started giving me an error when I try to build it. This is the error I'm getting:
当我尝试构建它时,突然间我的应用程序开始出现错误。这是我得到的错误:
ld: warning: directory not found for option '-L/Users/user/Documents/Developer/Alton-Towers-Times/build/Debug-iphoneos' ld: file too small (length=0) file '/Users/user/Library/Developer/Xcode/DerivedData/Mouse_Times_Florida-eqhrhnbxmmkxtahdghmnvehbzbgt/Build/Intermediates/Mouse Times Florida.build/Debug-iphonesimulator/Mouse Times Florida WatchKit Extension.build/Objects-normal/x86_64/SecondInterfaceController.o' for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
ld:警告:找不到选项“-L/Users/user/Documents/Developer/Alton-Towers-Times/build/Debug-iphoneos”的目录 ld:文件太小(长度=0)文件“/Users/user/” Library/Developer/Xcode/DerivedData/Mouse_Times_Florida-eqhrhnbxmmkxtahdghmnvehbzbgt/Build/Intermediates/Mouse Times Florida.build/Debug-iphonesimulator/Mouse Times Florida WatchKit Extension.build/Objects-normal/x86_64/SecondInterfaceController.o' for architecture x86:x86架构错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
Only thing I've really done since I last managed to get it to run was changing the bundle IDs and I also changed the app name. I've tried a few things including deleting the derived data, but nothing seems to have helped.
自从我上次设法让它运行以来,我真正做的唯一一件事就是更改包 ID,我还更改了应用程序名称。我尝试了一些事情,包括删除派生数据,但似乎没有任何帮助。
Anyone have any ideas?
谁有想法?
回答by veladan
I solved this warning removing the following setting: "$(SDKROOT)/Developer/Library/Frameworks"
我解决了这个警告,删除了以下设置:“$(SDKROOT)/Developer/Library/Frameworks”
This options is located in Settings -> Build Settings -> Search Paths -> Framework Search Paths
此选项位于 Settings -> Build Settings -> Search Paths -> Framework Search Paths
My project continues compiling and working fine, after removing this option.
删除此选项后,我的项目继续编译并正常工作。
回答by FredericK
Veladan answer helped me to sort out that issue on an iOS8 project freshly migrated to iOS9. This worked fine on the main target of my project, but the warning lasted on the unit tests target, so in the end I edited directly the project.pbxproj file and modified the entries :
Veladan 的回答帮助我解决了新迁移到 iOS9 的 iOS8 项目的问题。这在我项目的主要目标上运行良好,但警告持续在单元测试目标上,所以最后我直接编辑了 project.pbxproj 文件并修改了条目:
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
to :
到 :
FRAMEWORK_SEARCH_PATHS = "";