Using Boost with Xcode4

后端 未结 3 524
天涯浪人
天涯浪人 2021-01-31 22:25

has anyone setup a C++ Xcode4 project to use Boost? what settings do I need to set in Xcode for a simple C++ console application?

Thanks

相关标签:
3条回答
  • 2021-01-31 23:00

    Managed it with this:

    Link binaries with libraries

    and this:

    enter image description here

    0 讨论(0)
  • 2021-01-31 23:05
    1. Download the boost libraries for unix from : http://www.boost.org/
    2. Unzip it : Let's say now you have boost in "($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
    6. #include "boost/any.hpp" will work
    0 讨论(0)
  • 2021-01-31 23:15

    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).

    libboost_system.dylib and libboost_filesystem.dylib could be found in /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/

    0 讨论(0)
提交回复
热议问题