在 boost 中,有两种类型的库,一种以 结尾mt-gd,另一种以 结尾mt-s。这两者有什么区别?
25194 次
2 回答
53
- mt:多线程
- d :添加 ABI 标签,可用于:
- g :使用标准和运行时支持库的调试版本。
- s :静态链接到标准和运行时支持库。
- 和更多
于 2011-05-16T08:54:50.337 回答
13
正如其他答案和评论中所指出的,这些代表不同的配置。有了这个答案,我想给出一个更完整的概述并链接到相应的 Visual Studio 配置:
- Boost
-mt-s对应于 VS 的Runtime Library设置/MT - Boost
-mt-sgd对应于 VS 的Runtime Library设置/MTd - Boost
-mt对应于 VS 的Runtime Library设置/MD - Boost
-mt-gd对应于 VS 的Runtime Library设置/MDd
第一个和第二个可以构建./b2 runtime-link=static threading=multi
第三个和第四个可以构建./b2 runtime-link=shared threading=multi
于 2020-10-08T10:11:31.083 回答