如何使用 Xcode 和 Git 处理不同的库搜索路径?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20601558/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:26:22  来源:igfitidea点击:

How to handle different Library Search Paths with Xcode and Git?

iosobjective-cxcodegitpath

提问by electronix384128

I am working on an app with a friend.

我正在和朋友一起开发一个应用程序。

We use git (private) as versioning system. The problem we face is that Xcode (5.1 DP2) gives this warning: "Apple Mach-O Linker Warning - Directory not found for ..."

我们使用 git(私有)作为版本控制系统。我们面临的问题是 Xcode (5.1 DP2) 给出了这个警告:“Apple Mach-O Linker Warning - Directory not found for ...”

enter image description here

在此处输入图片说明

The reason for this warning is that Xcode cannot find the path from my friend on my hard drive.

出现此警告的原因是 Xcode 在我的硬盘上找不到我朋友的路径。

So my question is how to handle different absolute paths for the "Library Search Path" in Xcode in general when working with a team?

所以我的问题是在与团队合作时,通常如何处理 Xcode 中“库搜索路径”的不同绝对路径?

采纳答案by jonahb

Use the SRCROOTbuild setting. For example, add the following to Library Search Paths:

使用SRCROOT构建设置。例如,将以下内容添加到 Library Search Paths:

$(SRCROOT)/Libraries/MyLibrary

Full docs on Xcode build settings are here.

关于 Xcode 构建设置的完整文档在这里