Mac OS Install boost

Source: Internet
Author: User

Just started learning which Luo Jianfeng's "Boost Library full development guide", there are some problems and solutions under Mac OS under boost.

Environment: OS Yosemite (10.10.3)

Xcode:version 6.3


Operation Steps:

    1. Download boost and unzip;

    2. / Install;

    3. Configure in Xcode (console engineering), build setting Add header search Paths and library search Paths (Installation path for step 2), build phases in link Binary with Libraries add LIBBOOST_SYSTEM.A;

    4. Test: Mian function in # include "Boost/asio.hpp", compile.

Error Dyld:library not loaded:libboost_system.dylib referenced from:/users/shaunyi/library/developer/xcode/ Deriveddata/learningboost-djvlfrwiebzlncahwbsrniqfduuu/build/products/debug/learningboost reason:image not found;

You can compile successfully after adding libboost_system.dylib, but the following error will occur when executing: dyld_fatal_error

Cause: Because the XCODE5 completely switched to LLVM and discarded gcc, the boost library compiled with the old version of GCC will have the error of the load library (Dylib/dlopen??? Not too clear why), so you have to recompile the library with LLVM, preferably compiled to static.


Use the following command when compiling the Boost library:./ toolset=clang;./b2 Toolset=clang--without-mpi cxxflags= "-arch i386-arch x86_64- fvisibility=hidden-fvisibility-inlines-hidden-std=c++11-stdlib=libc++-ftemplate-depth=512 "linkflags="-stdlib= Libc++ "link=static Stage Install

Mac OS Install boost

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.