在X code 5使用Boost - 苹果LLVM 5.0 [英] Using Boost on XCode 5 - Apple LLVM 5.0

查看:110
本文介绍了在X code 5使用Boost - 苹果LLVM 5.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很高兴为NDA X code 5结束了,我可以问这个问题。

I am glad the NDA for XCode 5 is over and I can ask this question.

我有X code 5,现在的问题建筑升压,有只有一个LLVM编译器5.0

I have a problem building Boost for XCode 5 now that there is only one compiler LLVM 5.0

我试过用自制--c ++ 11,用铿锵....我已经试过各种想法和剧本,但至今没有工作过。

I've tried with Homebrew using --c++11, using clang.... I've tried various ideas and scripts but none has worked so far.

任何帮助将是AP preciated。谢谢

Any help would be appreciated. Thanks

推荐答案

要建立铿锵/ LLVM,为X code 5的唯一编译器编译升压1.54.0 32/64位胖静态二进制文件:

To build 32/64 bit fat static binaries for boost 1.54.0 compiled with clang/llvm, the only compiler for Xcode 5:


  1. 下载UNIX tar包(不是ZIP - !有CR / LF行结束符,将GACK)

  2. 解压它。

  3. cd到boost_1_54_0 /

  4. 运行:

  1. Download the unix tarball (not the ZIP! -- that has CR/LF line endings and will gack)
  2. Untar it.
  3. cd to boost_1_54_0/
  4. Run:

./ bootstrap.sh工具=铛

./bootstrap.sh toolset=clang

运行:

./ B2工具=铛--without-MPI CXXFLAGS = - 拱i386的-arch x86_64的-fvisibility =隐藏-fvisibility - 内联隐藏-std = C ++ 11 -stdlib = ++的libc -ftemplate深度= 512 LINKFLAGS = - STDLIB = libc中++链接=静态阶段

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

...这使输出库中./stage/lib

...which puts the output libs in ./stage/lib

然后移动你想要他们的库。

Then move the libraries where you want them.

这是发行库,这应该是你所需要的。

These are release libraries, which should be all you need.

这是OSX。您可以更改-arch,并且添加了CXXFLAGS =其他选项适用于iOS。

This is for OSX. You can change -arch and add other options in the cxxflags= for iOS.

如果你需要传递接口的消息,从B2命令删除--without-MPI。

If you need the message passing interface, remove --without-mpi from the b2 command.

====
有趣的事实:

==== Fun Facts:


  • 建设提升似乎是一个移动的目标,因此这些指令将在未来的版本likeley突破

  • 我试图-Wno-XXXX的警告关中CXXFLAGS = ...但它不工作

  • 的bjam和b2是一回事,B2是新的名称

  • 铛作为一流的工具某处沿途增加,因此可以忽略网络上的任何指示修改用户config.jam中
    (你需要的一切似乎能为这些一次性的B2命令行构建上进行传递。)

这篇关于在X code 5使用Boost - 苹果LLVM 5.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆