带有空格问题的 Xcode 项目/应用程序名称 - 找不到框架
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28156130/
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 project/app name with spaces issue - framework not found
提问by rihe
Is it possible that Xcode 6.1 doesn't finds my previously imported frameworks because of my 3 word app name? I'm using Parse and never ever had any problems with it. But actually when I open my project in Xcode I got an error that the framework doesn't found, which is absurd because it worked well earlier and I don't removed it. However if I delete the frameworks and add them again everything is fine. Am I doing something wrong or is it an Xcode bug?
由于我的 3 字应用程序名称,Xcode 6.1 是否可能找不到我以前导入的框架?我正在使用 Parse,从来没有遇到过任何问题。但实际上,当我在 Xcode 中打开我的项目时,我收到了一个错误,即框架没有找到,这很荒谬,因为它之前运行良好,而且我没有删除它。但是,如果我删除框架并再次添加它们,一切都很好。我做错了什么还是Xcode错误?
ld: warning: directory not found for option '-F/Users/donip/Documents/Fl Travel Guide/Fl'
ld: warning: directory not found for option '-FTravel'
ld: warning: directory not found for option '-FGuide'
ld: framework not found ParseFacebookUtils
clang: error: linker command failed with exit code 1 (use -v to see invocation)
回答by Muhammad Zeeshan
Simply enclose your framework path in double quotes(""). For example:
只需将您的框架路径用双引号 ("") 括起来。例如:
"$(SRCROOT)/my framework/path"
“$(SRCROOT)/我的框架/路径”
回答by Saurabh Shukla
"directory not found for option '-F/..."
“找不到选项'-F/...的目录”
Here '-F/..' shows it's a Framework Error. There could be 2 reasons for this.
这里的“-F/..”显示这是一个框架错误。这可能有 2 个原因。
Missing escape "\" character.
It seems search paths are broken up on several lines in the Framework Search Path or Library Search Paths. Or having spaces in path. Add the escape "\" character to fix it.
Click on your project (targets)-> Click on Build Settings-> Under Frameworks Search Paths, delete the paths.
缺少转义“\”字符。
似乎搜索路径在 Framework Search Path 或 Library Search Paths 中分成几行。或者路径中有空格。添加转义“\”字符来修复它。
单击您的项目(目标)-> 单击构建设置-> 在框架搜索路径下,删除路径。
回答by David V
I'm sure this is Xcode bug. Since a lot of other developers have problems with frameworks paths, such as Absolute path issuesI'm sure You will find other issues too in SO.
我确定这是 Xcode 错误。由于许多其他开发人员在框架路径方面存在问题,例如绝对路径问题,我相信您也会在 SO 中发现其他问题。
I have encountered this issues myself too. Best solution for me just commit working project files, and then reset/revert new/wrong changes which done by Xcode.
我自己也遇到过这个问题。对我来说最好的解决方案只是提交工作项目文件,然后重置/恢复由 Xcode 完成的新/错误更改。
回答by atwalsh
For me, I had to delete (using Terminal):
对我来说,我不得不删除(使用终端):
/Users/xxxxxxx/Library/Developer/Xcode/DerivedData/PROJECT_NAME
Using:
使用:
rm -r PROJECT_NAME-xxxxxxxx
If you have multiple projects with the same name in the /DerivedData
folder, first try deleting all but the most recent one. If that does not work, try deleting all projects including the most recent.
如果/DerivedData
文件夹中有多个同名项目,请先尝试删除除最新项目之外的所有项目。如果这不起作用,请尝试删除所有项目,包括最新的项目。
回答by Mrunal
Just update your library location to such a path which doesn't have any spaces inbetween. For example, instead of :
只需将您的库位置更新为中间没有任何空格的路径。例如,而不是:
'-F/Users/donip/Documents/Fl Travel Guide/Fl'
use
用
'-F/Users/donip/Documents/FlTravelGuide/Fl'
Just change the folder name, available in that path, then make the same change in project settings in Library Search Paths
and Header Search Paths
, wherever its been referred.
只需更改该路径中可用的文件夹名称,然后在Library Search Paths
和中的项目设置中进行相同的更改Header Search Paths
,无论它被引用到何处。
Hope this will resolve your query.
希望这能解决您的疑问。