Qt使用boost库

1、在官网下载boost库

boost_1_70_0.zip

2、将你的Qt的工具目录(有gcc.exe)设置环境变量。(比如F:Qt592Toolsmingw530_32in)

3、在命令行进入boost_1_70_1/tools/build/src/engine

4、执行 build.bat gcc,在当前目录将会生成bin.ntx86文件夹,里面包含两个exe文件b2.exe,bjam.exe

5、将bin.ntx86jam.exe拷贝到解压目录根目录下oost_1_70

6、change dir 进入boost_1_70

7、’执行命令 bjam "toolset=gcc" install,执行命令会在C盘根目录下生成一个Boost文件夹。我们要使用的头文件与lib就在里边。

8、将7中生成的 Boost 里的 boost文件夹拷贝到qt 的include下面(我的在 F:Qt5925.9.2mingw53_32include)

9、将7中生成的 Boost 里的 lib下.a文件拷贝到 qt lib目录下 (我的在 F:Qt5925.9.2mingw53_32lib)

原文地址:https://www.cnblogs.com/judes/p/11027830.html