Xcode:项目设置与目标设置 [英] Xcode: project settings vs. target settings

查看:241
本文介绍了Xcode:项目设置与目标设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Mac OS X上为我们的一位客户创建一个静态库,以及一个用于测试静态库的小型cmd line应用程序. cmd line项目有2个额外的库搜索路径,这意味着我在发布模式下链接到Debug版本,并且快要疯了,所以我试图摆脱这两个路径,但是我找不到它们的指定位置.我在查看项目信息,但事实证明它们是在目标信息中指定的.

I'm creating a static lib on Mac OS X for one of our customers, as well as a small cmd line app to test the static lib. The cmd line project has 2 extra library search paths, which meant I was linking to the Debug version in Release mode and just about went crazy, so I tried to get rid of these two paths, but I couldn't find where they were specified. I was looking in the project info, but it turns out they were specified in the target info.

我不明白区别吗?!为什么要设置两组基本相同的设置?有人可以启发我吗?

I don't understand the distinction?! Why there are 2 sets of settings, which are essentially the same?! Can someone please enlighten me?

推荐答案

一个项目可以包含多个目标.例如,我编写的一个应用程序有四个-应用程序本身,一个Quick Look插件,一个框架和一个包含可动态加载的Mac OS 10.6特定功能的捆绑软件.

A project can contain multiple targets. For example, an app I write has four - the app itself, a Quick Look plugin, a framework and a bundle that contains Mac OS 10.6-specific functionality that can be dynamically loaded in.

项目设置适用于项目中的每个目标.然后,每个目标都可以根据需要覆盖各个设置-例如,我项目的目标SDK设置为10.5,但是10.6特定的捆绑包将其目标SDK设置为10.6.

Project settings apply to every single target in the project. Each target can then override individual settings if they need to - for instance, my project's Target SDK is set to 10.5, but the 10.6-specific bundle has it's Target SDK set to 10.6.

在某些情况下,有些设置在项目设置中是没有意义的-我想其中之一就是搜索路径.

In some instances, some settings don't make sense to be in Project Settings - one of these, I guess, is search paths.

这篇关于Xcode:项目设置与目标设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆