2013-08-07 53 views
0

當我構建boost C++庫時,是否需要指定cxxflags=-std=c++11?我實際上使用mingw 4.8.0(x32,posix,dwarf,Qt 5.1.0提供的相同)和boost C++ 1.54.0(在boost下載頁面中指定了所有補丁)。用mingw構建boost C++

+3

如果你想Boost利用可用的C++ 11功能,你應該這樣做。 – Praetorian

回答

0

對於我的系統(gcc 4.8.1,x64)不需要的構建提升本身。我在Windows命令PROMT使用(不MSYS):

bootstrap mingw 

bjam toolset=gcc link=shared variant=debug,release 

或者你可以B2 (Reference)使用。您必須在包含路徑中有所提升,但是

export CFLAGS="-I/path_to_boost/boost_1_54_0" 
export CXXFLAGS="-I/path_to_boost/boost_1_54_0" 

對於編譯應該使用C++ 11功能的程序,您需要它;獨立如果使用提升。

+0

是'bootstrap mingw'相當於'bootstrap gcc'在windows? –

+0

對不起,我不知道。但我猜不會。 –