简体   繁体   English

在Xcode4中使用Boost

[英]Using Boost with Xcode4

has anyone setup a C++ Xcode4 project to use Boost? 有没有人设置C ++ Xcode4项目来使用Boost? what settings do I need to set in Xcode for a simple C++ console application? 我需要在Xcode中为简单的C ++控制台应用程序设置什么设置?

Thanks 谢谢

Managed it with this: 管理它:

链接二进制文件与库

and this: 和这个:

在此输入图像描述

I would just like to add on to the previous post: 我想补充上一篇文章:

After running 跑完之后

$ sudo port install boost (this can be done once you have macports installed). $ sudo port install boost(这可以在安装了macport后完成)。

libboost_system.dylib and libboost_filesystem.dylib could be found in /opt/local/lib/ libboost_system.dylib和libboost_filesystem.dylib可以在/ opt / local / lib /中找到

boost_1_46_1.tar.bz2 will be located in /opt/local/var/macports/distfiles/boost/ Unarchive it, then copy and paste the folder named "Boost" to /usr/local/include/ boost_1_46_1.tar.bz2将位于/ opt / local / var / macports / distfiles / boost / Unarchive中,然后将名为“Boost”的文件夹复制并粘贴到/ usr / local / include /

  1. Download the boost libraries for unix from : http://www.boost.org/ 从以下网址下载unix的boost库: http//www.boost.org/
  2. Unzip it : Let's say now you have boost in "($USER_NAME)/boost_X_YY_0" 解压缩它:让我们说现在你有“($ USER_NAME)/ boost_X_YY_0”的提升
  3. Open your console Application project 打开控制台应用程序项目
  4. Click on top left node in the project directory pane (left hand side). 单击项目目录窗格(左侧)中的左上角节点。 This should be your project name 这应该是您的项目名称
  5. Build Settings -> Search Paths -> Header Search Paths ->Add the "($USER_NAME)/boost_X_YY_0" path 构建设置 - >搜索路径 - >标题搜索路径 - >添加“($ USER_NAME)/ boost_X_YY_0”路径
  6. #include "boost/any.hpp" will work #include“boost / any.hpp”将起作用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM