【问题标题】:Building Boost.Build engine 'cl' is not recognized as an internal or external command, operable program or batch file构建 Boost.Build 引擎 'cl' 不是内部或外部命令、可运行程序或批处理文件
【发布时间】:2017-03-14 18:36:54
【问题描述】:

谁能告诉我为什么 bootstrap.bat 失败了?

平台:
视窗 10
提升 boost_1_63_0

C:\Boost\boost_1_63_0>bootstrap.bat
Building Boost.Build engine
'cl' is not recognized as an internal or external command,
operable program or batch file.

Failed to build Boost.Build engine.
Please consult bootstrap.log for further diagnostics.

You can try to obtain a prebuilt binary from

   http://sf.net/project/showfiles.php?group_id=7586&package_id=72941

Also, you can file an issue at http://svn.boost.org
Please attach bootstrap.log in that case.

C:\Boost\boost_1_63_0>

【问题讨论】:

    标签: boost


    【解决方案1】:

    正如我在Build boost with msvc 14.1 ( VS2017 RC)中找到的答案

    您需要使用 Visual Studio 2017 的开发者命令提示符!

    它位于开始 - 所有程序 - Visual Studio 2017 - Visual Studio 工具 - VS 2017 的开发人员命令提示符

    【讨论】:

    • Developer Command Prompt for VS2017 compile-c-c++ bin.v2\libs\system\build\msvc-14.1\debug\address-model-64\threading g-multi\error_code.obj 'cl' 是不被识别为内部或外部命令、可运行程序或批处理文件。
    • 我在安装 14.0 时显然被误导了指定 14.1。这是 14.1 的“建议”stackoverflow.com/questions/43946538/…
    • 您可能需要以管理员身份运行它(右键单击,'以管理员身份运行')
    • 您可以在任何命令窗口中通过执行C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat来激活开发者命令提示符
    【解决方案2】:

    错误提示找不到编译器。最可能的原因是:

    • 编译器未安装或安装在非标准路径中。
    • 您的编译器是 Visual Studio 2017,Boost 1.63 不支持该编译器,并且由于 Microsoft 所做的更改而无法自动找到。

    如果您使用的是 Visual Studio,您可以尝试从编译器命令行提示符运行引导程序。

    【讨论】:

    • 对于 VS2015,用于启动命令提示符的快捷方式位于:C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2015\Visual Studio Tools\Windows Desktop Command Prompts(无论如何在我的系统上,但我很确定我使用默认配置安装)
    【解决方案3】:

    我已经解决了安装 Visual Studio 并将路径 C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\Hostx64\x64 添加到环境变量. 看这个页面click here

    【讨论】:

      【解决方案4】:

      我发现以下关于此问题的讨论包括 Microsoft 和 Boost 团队。它分布在 Github 问题和邮件列表中:

      https://github.com/boostorg/build/issues/157

      https://lists.boost.org/Archives/boost/2017/03/234024.php

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-06-15
        • 2018-08-25
        • 2014-06-01
        • 2022-01-06
        • 2016-07-07
        • 2021-12-20
        • 2016-12-03
        • 2019-04-25
        相关资源
        最近更新 更多