简体   繁体   中英

build boost c++ with mingw

Does I have to specify cxxflags=-std=c++11 when I build boost c++ library? I am actually using mingw 4.8.0 (x32,posix,dwarf, the same provided by Qt 5.1.0) and boost C++ 1.54.0 (with all patches as specified in the boost download page).

For building boost itself that was not necessary on my system (gcc 4.8.1, x64). I used on the Windows command promt (not msys):

bootstrap mingw

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

Alternatively you may use b2 (Reference) . You have to have boost in your include path, though

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

For compiling programs which should use C++11 features, you need it; independent if boost is used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM