第一次在windows装boost,不小心下载了最新版,瞎操作了一番,发现和网上说的都不一样,想再重新装老版本,又怕版本之间有冲突,只好硬着头皮装下去,好在成功了,以下我就分享一下新版boost的安装方法吧,其实大体上换汤不换药的,就是目录结构有变化,第一次装的人可能比较慌。
1、下载地址:https://www.boost.org/users/history/version_1_72_0.html
2、解压到安装目录:E:\Program Files\boost\boost_1_72_0(这是我的目录)
3、打开cmd,执行:cd E:\Program Files\boost\boost_1_72_0\tools\build\src\engine
再执行:build.bat gcc,执行结果如下:
(这里的gcc命令是取自DEVC++,在PATH里面添加一下地址,如:E:\Program Files\Dev-Cpp\MinGW64\bin)

4、把目录下生成的 bjam.exe 复制到boost根目录 E:\Program Files\boost\boost_1_72_0
打开cmd,执行 cd E:\Program Files\boost\boost_1_72_0
再执行: bjam --build-dir=build --toolset=gcc
然后等待小半小时(超多内容,以下是首尾截图)


5、在DEVC++中添加 boost
工具->编译选项->目录->C++包含文件中->点击下图“添加文件夹图标”-> E:\Program Files\boost\boost_1_72_0
