从Xcode链接到Boost [英] Linking to Boost from Xcode

查看:86
本文介绍了从Xcode链接到Boost的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用Boost-library编译Xcode(4.5.2.版)项目.我已经在Mac上成功安装了Boost,并且收到以下消息:

I want to compile an Xcode (version 4.5.2.) project using Boost-library. I have successfully installed Boost on my mac and I got the following message:

The following directory should be added to compiler include paths:
XXX/boost_1_52_0
The following directory should be added to linker library paths:
XXX/boost_1_52_0/stage/lib

如何在Xcode中添加编译器包含路径和链接器库路径?非常感谢.

How do I add a compiler include path and a linker library path in Xcode? Many thanks.

推荐答案

我应该提到以下内容适用于Xcode 4.5.2.您可能应该在问题中提及正在使用的Xcode版本.

I should mention the following is for Xcode 4.5.2. You should likely mention which version of Xcode you're using in your question.

  1. 在项目导航器中,选择您的项目文件(通常在顶部)
  2. 给出基本"或全部"两个视图选择,在视图窗格中选择全部".
  3. 在设置列表中找到搜索路径部分
  4. 在搜索路径下找到标题搜索路径小节
  5. 添加路径(绝对路径或相对于源文件夹的路径).您可以同时进行调试,发布或同时执行.
  1. In the Project Navigator select your project file (usually at the top)
  2. Given the two view choices of Basic or All, choose All in the view pane.
  3. Locate the Search Paths section in the settings list
  4. Locate the Header Search Paths subsection under Search Paths
  5. Add the path (absolute or relative to the source folder). You can do it for Debug, Release, or Both.

如果您没有看到它,也可以在此处添加附加库搜索路径,该区域在同一区域的库搜索路径

And in case you didn't see it, you can add addition library search paths here as well, same area, subsection Library Search Paths

已针对Xcode 5.0.2更新

  1. 在项目导航器中,选择您的项目文件(通常在顶部)
  2. 在右窗格中是项目配置面板.左上角有两组可选的单选选项.一个说基本"或全部",请选择全部.第二个显示合并"或级别",选择合并.
  3. 在设置列表中找到搜索路径部分
  4. 在搜索路径下找到标题搜索路径小节
  5. 添加路径(绝对路径或相对于源文件夹的路径).您可以同时进行调试,发布或同时执行.
  1. In the Project Navigator select your project file (usually at the top)
  2. In the right pane is the project configuration panel. Toward the top-left are two sets of selectable radio options. One says Basic or All, choose All. The second says Combined or Levels, choose Combined.
  3. Locate the Search Paths section in the settings list
  4. Locate the Header Search Paths subsection under Search Paths
  5. Add the path (absolute or relative to the source folder). You can do it for Debug, Release, or Both.

这篇关于从Xcode链接到Boost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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