Because Apple changes the compiler to llvm only in XCode5, so there are some compatible problems with the boost library compiled by old gcc , I tried several days, and get the result, we must set the compiler to clang.

1. download newest boost sourcecode from http://sourceforge.net/projects/boost/files/boost/1.54.0/

2. use tar to uncompress it, then execute ./bootstrap.sh --prefix=/Users/dotphoenix/Public/boost toolset=clang

we set the install path to /Users/dotphoenix/Public/boost , changes it to yours, the very important is set compiler to clang

3. ./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

the static libraries are installed at /Users/dotphoenix/Public/boost/lib, and the headers are installed at /Users/dotphoenix/Public/boost/include

4. add the library path and the header path at Build Settings->Search Paths, then Add files to ...

中文:

因为XCode5 完全切换到了LLVM,丢弃了GCC,所以使用旧版本GCC编译的boost库会出现load library的错误(dylib/dlopen???不是太明白原因),所以必须使用LLVM重新编译库,最好是编译成静态的,上面的步骤就是做这个事情的。

XCode5/Apple LLVM 5.0下使用boost的方法的更多相关文章

  1. ios学习之路四(新建Sprite Kit 项目的时候出现apple LLVM 5.0 error)

    在新建sprite kit 项目的时候出现"apple LLVM 5.0 error" 解决方法 在网上搜索,stackoverflow 上是这么说的点击打开链接.按照他的我也没解 ...

  2. Apple LLVM 6.0 Warning: profile data may be out of date

    I have no clue what this meant, so I googled the problem. I only ended up with some search results s ...

  3. .net core 2.0下的容器注册方法

    https://www.cnblogs.com/Wddpct/p/5764511.html 自带的容器注册方法真的很好用

  4. vs 下安装boost

    首先到boost官网去下载最新的版本的boost库,选对对应的平台版本. 下载官网 解压文件, 先运行bootstrap.bat文件,生成bjam.exe并运行它.推荐完全编译的方式运行bjam 推荐 ...

  5. 如何在WINDOWS下编译BOOST C++库 .

    如何在WINDOWS下编译BOOST C++库 cheungmine 2008-6-25   写出来,怕自己以后忘记了,也为初学者参考.使用VC8.0和boost1.35.0.   1)下载boost ...

  6. windows下编译Boost

    当前boost最新版本为1.55,下载地址:http://sourceforge.net/projects/boost/files/boost/1.55.0/或者从官网(www.boost.org)下 ...

  7. Ubuntu下使用boost例子

    http://blog.csdn.net/dotphoenix/article/details/8459277 1. 安装boost库 sudo apt-get install libboost-al ...

  8. 在vs2010下编译boost

    1. 解压缩后,运行bootstrap.bat批处理文件,得到bjam.exe; 2. 在vs2010下编译boost boost最新版本已经支持vs2010,然而直接下载编译会发现一堆bug: 首先 ...

  9. VS2005下安装boost

    本文参照http://dxwang.blog.51cto.com/384651/711798 (一)boost的安装和编译 1:下载boost版本,目前最新的版本为1-47-0    下载地址为htt ...

随机推荐

  1. propertychange input change

    IE678 支持propertychange事件,可以监听所有属性(包括自定义属性)的改变事件,包括手动修改输入框文本以及js修改输入框文本. propertychange事件有个特点就是不支持冒泡, ...

  2. git在windows常用命令

    git add * git commit(会自动打开一个文本文档让你写提交注释),若是不好用可以用 git commit -m "注释" git push

  3. 安卓之cannot convert from Fragment1 to Fragment

    在写一个音乐播放器的时候,用到了fragment,结果在需要返回Fragment的方法里面,无法将Fragment1(Fragment的子类)强制转换成Fragment, 很是纳闷,我是参照一个开源代 ...

  4. .net截取指定长度汉字超出部分以指定的字符代替

    下面是我在网上搜索,然后加以整理的关于在.net中截取指定长度汉字超出部分以指定的字符代替,来拓展一下自己的思路. 方法一 :在后台的select语句中直接操作或是在数据库中写一个存储过程 Selec ...

  5. Ajax的原理和运行机制

    关于ajax,是最近炒得非常火的一种技术,并且时下它也是非常流行.当然,它并不是什么新技术,而是在各种已有的技术和支持机制下的一个统一.在我的项目中,偶尔也会用到ajax,用来给用户一些无刷新的体验. ...

  6. Subversion 1.7 Eclipse integration in Ubuntu12(转载)

    原文链接:http://steveliles.github.io/subversion_1_7_eclipse_integration_in_ubuntu.html Getting Subversio ...

  7. 网易DBA私享会分享会笔记1

    1.mysql生态+DBA职业发展世界范围流行的开源关系型的数据库关系型数据库:mysql,oracle,sql server,access,postgresql,sqlite,sybase,info ...

  8. PHP mongoDB 操作

    <?php /** * PHP操作MongoDB学习笔记 */ //************************* //** 连接MongoDB数据库 **// //************ ...

  9. light oj 1248 第六周E题(期望)

    E - 期望(经典问题) Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu   Descri ...

  10. 浅谈iOS视频播放的N种解决方案

    简       注册登录 添加关注 作者 Maru2016.03.22 20:46* 写了4349字,被135人关注,获得了207个喜欢 字数1621 阅读2895 评论43 喜欢159 header ...