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. SVN global ignore pattern for c#

    *.resharperoptions Web_Data log */[Bb]in [Bb]in */obj obj  */TestResults TestResults *.svclog Debug ...

  2. cocos2dx 资源合并.

    文件合并之前 文件合并之后 吐槽 我们项目比较奇葩, ui用cocostudio做, 这项光荣的任务由美术接手. 这个美术是个新手, 经过我长时间的观察, 她似乎不用怎么画画. 至少在很长一段时间里, ...

  3. margin-top在IE与其他浏览器下的不同

    两个box,box1嵌套box2, box2使用margin-top在IE下与其他浏览器不同.待整理

  4. Linux下Openfire相关安装和配置

    记录下来,方便下次再用时从头查找资料 小京东ecshop中的通讯有用到openfire,Window下配置安装很简单,直接下载exe文件安装就行,而linux下要麻烦一点.安装后的配置下面会细说: 一 ...

  5. 字符串截取slice() substring() substr()的区别?

    获取子字符串 slice()        substr()    substring() 不会修改字符串本身,他们只是返回一个基本类型的字符串值 var str='abcdefghijklmn'; ...

  6. JavaScript重复元素处理

    判断一个字符串中出现次数最多的字符,统计这个次数 //将字符串的字符保存在一个hash table中,key是字符,value是这个字符出现的次数 var str = "abcdefgadd ...

  7. SQL SERVER 数据库邮件配置

    1.简单了解数据库邮件的概念和使用的传输协议及系统体系: 数据库邮件是从 SQL Server 数据库引擎中发送电子邮件的企业解决方案.通过使用数据库邮件,数据库应用程序可以向用户发送电子邮件.邮件中 ...

  8. ajax+json数据传输

    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding= ...

  9. 初识DSP

    初识DSP 1.TI DSP的选型主要考虑处理速度.功耗.程序存储器和数据存储器的容量.片内的资源,如定时器的数量.I/O口数量.中断数量.DMA通道数等.DSP的主要供应商有TI,ADI,Motor ...

  10. linux浏览器,邮件客户端,输入法,双屏设置,应用软件,scrot -s截图,office

    搜狗输入法linux版:http://pinyin.sogou.com/linux/help.php win/linux同时支持比较好用的浏览器:maxthon,firefox,maxthon,ope ...