本文介绍了XCode库搜索路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于我的iOS项目,我有一个特定的文件夹结构:

For my iOS project, I have a specific folder structure:

|-- root    
|     |-- src
|     |  |-- xcode                            
|     |     |-- MyProject
|     |        |-- <sources>, ...
|     |     |-- MyProject.xcodeproj
|-- library

在构建设置中,我想添加指向库"的库搜索路径,该路径与根"目录处于同一级别.当我放入$(SRCROOT)时,搜索路径正确指向root/src/xcode目录.但是,我不知道如何在项目src上方"查找两个文件夹.
我尝试过"../../$(SRCROOT)",但无效.

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)/../../../library(我不确定它是否需要尾部斜杠)

I think it's $(SRCROOT)/../../../library (I'm not sure whether it needs trailing slash)

$(SRCROOT)/..指向root/src(比root/src/xcode高1级)

$(SRCROOT)/../..指向root(比root/src/xcode高两个级别)

$(SRCROOT)/../.. points to root(two levels up from root/src/xcode)

$(SRCROOT)/../../../library指向library

这篇关于XCode库搜索路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 20:34