Ubuntu 15.04 clang++ 3.6 编译boost 1.59/1.55
来源:互联网 发布:搜索引擎优化实战培训 编辑:程序博客网 时间:2024/06/05 00:19
Ubuntu 15.04已经可以直接通过apt-get insall 安装clang 3.6, 并且预装的gcc版本是4.9.2。这些安装过程在这里介绍。
首先下载boost源码
wget -O boost.1.59.tar.bz2 http://sourceforge.net/projects/boost/files/latest/download?source=files
解压
tar jxvf ./boost.1.59.tar.bz2
指定clang工具,生成编译脚本
./bootstrap.sh --with-libraries=system,filesystem,log,atomic,thread,program_options --with-toolset=clang
编译并安装
./b2 toolset=clang cxxflags="-std=c++11" sudo ./b2 install --prefix=/usr
等一会儿就好。
要注意的是,boost 1.59 似乎有问题,因为编译安装之后,我的一个简单的使用boost log的程序编译会报错,错误如下:
clang++ -g -std=c++11 -I../include -Wall -DBOOST_LOG_DYN_LINK -o./object/main.cc.o -c ../src/main.cc In file included from../src/main.cc:8: In file included from ../include/helper/logger.h:16:In file included from /usr/include/boost/log/sinks.hpp:25: In fileincluded from /usr/include/boost/log/sinks/async_frontend.hpp:42: Infile included from/usr/include/boost/log/sinks/unbounded_fifo_queue.hpp:29: In fileincluded from /usr/include/boost/log/detail/event.hpp:25: In fileincluded from /usr/include/boost/atomic/capabilities.hpp:18: In fileincluded from /usr/include/boost/atomic/detail/platform.hpp:22:/usr/include/boost/atomic/detail/gcc-atomic.hpp:35:67: error: unknowntype name 'memory_order' BOOST_FORCEINLINE BOOST_CONSTEXPR intconvert_memory_order_to_gcc(memory_order order) BOOST_NOEXCEPT/usr/include/boost/atomic/detail/gcc-atomic.hpp:37:22: error: use ofundeclared identifier 'memory_order_relaxed'
当我降级到boost 1.55.0后,问题消失。
0 0
- Ubuntu 15.04 clang++ 3.6 编译boost 1.59/1.55
- Ubuntu源码编译clang
- Ubuntu编译安装llvm-clang
- Ubuntu编译安装llvm+clang
- Ubuntu编译安装llvm-clang
- Ubuntu编译安装llvm-clang
- Ubuntu Sublime_text3 Clang 编译的简单配置
- 编译clang
- Ubuntu下Clang和LLVM的编译安装
- 在 Ubuntu 14.04 上编译 llvm 和 clang 3.8
- ubuntu 14.04 Clang编译安装,libclang解析c++代码
- 编译boost 1.55
- cocos2dx boost 1.55 编译
- 在ubuntu上编译boost,boost的安装目录设置
- Ubuntu下boost库编译安装
- 编译ubuntu下面的boost 1.52
- 【转载】ubuntu下编译安装boost库
- ubuntu下编译安装boost库
- 双链表的实现C++封装
- Ubuntu用Wine运行Windows应用程序和卸载
- hdu 3971
- 中兴f402 412等破解超级密码、破解用户限制、关闭远程控制、恢复路由器拨号
- 学习与实践Cadence总结
- Ubuntu 15.04 clang++ 3.6 编译boost 1.59/1.55
- 山峰
- 将矩阵顺时针旋转90度 leetCode:Rotate Image
- Convert Sorted List to Binary Search Tree
- Java中的进制转换,练习
- linux 几个简单shell脚本demo
- UIAlertView提示控件和UIActionSheet的使用
- CodeForces-327A Flipping Game
- ant 中 if else