Boost 安装:缺少参数 global-setup [英] Boost installation: missing argument global-setup
问题描述
我正在尝试在 Windows 10 上安装 boost 库.我安装了 VS2017.我打开了 Developer Command Prompt 2017,我已经输入了 boostrap
,现在在编写 b2
时,出现以下错误:
I am trying to install boost library on Windows 10. I have VS2017 installed.
I open the Developer Command Prompt 2017, and I already typed boostrap
and now while writing b2
, I get the following error:
C:\Program Files\boost\boost_1_60_0>b2
C:/Program Files/boost/boost_1_60_0/tools/build/src/tools\msvc.jam:1072: in configure-really
*** argument error
* rule generate-setup-cmd ( version : command : parent : options * : cpu : global-setup : default-global-setup-options : default-setup )
* called with: ( default : C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\Hostx86\x86 : C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\Hostx86 : : i386 : : x86 : vcvars32.bat )
* missing argument global-setup
C:/Program Files/boost/boost_1_60_0/tools/build/src/tools\msvc.jam:798:see definition of rule 'generate-setup-cmd' being called
C:/Program Files/boost/boost_1_60_0/tools/build/src/tools\msvc.jam:201: in configure
C:/Program Files/boost/boost_1_60_0/tools/build/src/tools\msvc.jam:153: in msvc.init
C:/Program Files/boost/boost_1_60_0/tools/build/src/build\toolset.jam:43: in toolset.using
C:/Program Files/boost/boost_1_60_0/tools/build/src/build\project.jam:1052: in using
project-config.jam:3: in modules.load
C:/Program Files/boost/boost_1_60_0/tools/build/src\build-system.jam:249: in load-config
C:/Program Files/boost/boost_1_60_0/tools/build/src\build-system.jam:412: in load-configuration-files
C:/Program Files/boost/boost_1_60_0/tools/build/src\build-system.jam:524: in load
C:\Program Files\boost\boost_1_60_0\tools\build\src/kernel\modules.jam:295: in import
C:\Program Files\boost\boost_1_60_0\tools\build\src/kernel/bootstrap.jam:139: in boost-build
C:\Program Files\boost\boost_1_60_0\boost-build.jam:17: in module scope
我不知道如何解决这个问题.
I am not sure how to solve this.
推荐答案
运行 bootstrap 后编辑 project-config.jam
并进行如下更改.
After running bootstrap edit project-config.jam
and make changes as shown below.
import option ;
using msvc : 14.0 : "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\Hostx86\x86\cl.exe";
option.set keep-going : false ;
根据您发布的错误信息采用了 14.14.26428 版本.确保版本存在,如果不更改版本或安装所需的版本.以上命令用于构建 32 位.如果您需要 64 位,请将其更改为 Hostx64\x64
Have taken version 14.14.26428 based on the error information you have posted. Make sure that version exist, if not change the version or install the one which is required.
The above command is for building 32 bit. If you need 64 bit change it to Hostx64\x64
这篇关于Boost 安装:缺少参数 global-setup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!