BOOST库是标准库很有效的补充.
1.安装MinGW:
也可以使用Qt自带的mingw
并mingw的bin目录添加到PATH
2. 安装boost:
以下2选1:
方式1:编译好的MSVC:
http://dl.bintray.com/boostorg/release/
方式2:官网未编译的Boost:https://www.boost.org/users/download/
解压后:
文件结构说明:(来源Boost文档:https://www.boost.org/doc/libs/1_73_0/more/getting_started/windows.html)
使用git bash、cygwin【关于cygwin是什么可自行百度,这里以git bash作为说明】等bash工具:
关于工具集的说明:
执行了上面的操作会生成b2:
双击执行等待/。。(耗时较长)
完成后窗口就自动关闭了,不用惊慌。
3.打开Clion,编写CMake脚本:(查阅Clion Jetbrains文档说明及Stackoverflow)
Reload change后编写测试代码验证是否导入成功:
例如这里的把string转换为int等