XCode 库搜索路径
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16309434/
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 Library search path
提问by Maggie
For my iOS project, I have a specific folder structure:
对于我的 iOS 项目,我有一个特定的文件夹结构:
|-- root
| |-- src
| | |-- xcode
| | |-- MyProject
| | |-- <sources>, ...
| | |-- MyProject.xcodeproj
|-- library
In build settings, I would like to add Library Search Path that points to "library", which is on the same level as "root" directory. When I put $(SRCROOT)
, search path correctly points to root/src/xcode
directory. However, I do not know how to look for library two folders "above" the src of the project.
I have tried with
"../../$(SRCROOT)" but with no effect.
在构建设置中,我想添加指向“库”的库搜索路径,该路径与“根”目录处于同一级别。当我放置时$(SRCROOT)
,搜索路径正确指向root/src/xcode
目录。但是,我不知道如何在项目的 src “上方”查找库两个文件夹。
我试过“../../$(SRCROOT)”但没有效果。
Is it even possible?
甚至有可能吗?
回答by Kreiri
I think it's $(SRCROOT)/../../../library
(I'm not sure whether it needs trailing slash)
我认为是$(SRCROOT)/../../../library
(我不确定它是否需要尾部斜杠)
$(SRCROOT)/..
points to root/src
(one level up from root/src/xcode
)
$(SRCROOT)/..
指向root/src
(从 上一层root/src/xcode
)
$(SRCROOT)/../..
points to root
(two levels up from root/src/xcode
)
$(SRCROOT)/../..
指向root
(从 向上两级root/src/xcode
)
$(SRCROOT)/../../../library
points to library
$(SRCROOT)/../../../library
指着 library