gpt4 book ai didi

c++ - 使用 MSVC 2015 构建 boost 1.55 时指定工具集版本

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:14:13 24 4
gpt4 key购买 nike

我下载 boost 1.55,解压,然后运行以下命令:

> bootstrap.bat
cl : Command line warning D9035 : option 'GZ' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'RTC1' instead of 'GZ'
cl : Command line warning D9002 : ignoring unknown option '/MLd'

Bootstrapping is done. To build, run:
...

> b2 --build-type=complete --build-dir=build --toolset=msvc-14.0 stage

但是,我收到以下错误:

error: msvc initialization: parameter 'version' inconsistent
error: no value was specified in earlier initialization
error: an explicit value is specified now

按照与 MSVC 2012 相同的步骤,我没有收到该错误。

如果我改为执行 --toolset=msvc,那么它就可以工作。但是,生成的文件有 -vc 而不是 -vc140,这是我想要的。

如何明确指定工具集?它在哪里“在早期初始化中指定”

(我想这样做的原因是我后来收到一个奇怪的链接器错误 - 说它正在寻找一些 -vc120 boost 库......我不知道为什么。我试图消除所有的可能性。)

最佳答案

之前指定的版本在project-config.jam中:

using msvc ; 

将其更改为:

using msvc : 14.0 ;

关于c++ - 使用 MSVC 2015 构建 boost 1.55 时指定工具集版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34293380/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com