boost linux下静态库编译
以编译1.72为例/bootstrap.sh./b2 -acxxflags='-fPIC -std=c++11' install --prefix=/home/install/boost/boost_1_72_0 link=static threading=multi.
·
以gcc4.8.5编译1.72为例
./bootstrap.sh
./b2 -a cxxflags='-fPIC -std=c++11 -O3' linkflags="-O3" install --prefix=/home/install/boost/boost_1_72_0 link=static threading=multi boost.locale.icu=off
./b2 install --prefix=/home/install/boost/boost_1_72_0 link=shared threading=multi boost.locale.icu=off variant=release
win下:
./b2 install --prefix="E:\boost_1_78_0\vs2017" --toolset=msvc-14.1 address-model=64 link=static runtime-link=shared threading=multi variant=release
在win下使用boost1.78的boost.log时需要在cmake添加
ADD_DEFINITIONS("-DBOOST_USE_WINAPI_VERSION=0x0601")
否则编译失败
.
更多推荐
已为社区贡献2条内容
所有评论(0)