首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何告诉CMake在哪里可以找到编译器?

如何告诉CMake在哪里可以找到编译器?
EN

Stack Overflow用户
提问于 2021-03-30 04:39:36
回答 1查看 193关注 0票数 0

我正在尝试安装slycot,我得到了以下问题。

代码语言:javascript
运行
复制
The CMAKE_C_COMPILER: cl is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
    that can use the compiler cl from the command line.  This environment is
    unable to invoke the cl compiler.  To fix this problem, run cmake from the
    Visual Studio Command Prompt (vcvarsall.bat).

    Tell CMake where to find the compiler by setting either the environment
    variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
    the compiler, or to the compiler name if it is in the PATH

我下载了Visual Studio 2019。我试图从VS命令提示符运行"CMake“,但是什么也没有发生。

我在VS文件夹中找到了vcvarsall.bat文件位置,但我不知道如何处理它。有人愿意告诉我下一步该做什么吗?(我是个脚本新手,所以请明确一点)。

谢谢

EN

Stack Overflow用户

发布于 2021-03-30 04:44:42

通常,cmake使用程序vswhere.exe来检测您的VS2019安装。但有时这似乎不起作用。您可以运行

代码语言:javascript
运行
复制
vcvarsall.bat Win64 

在命令提示符下设置环境变量。如何找到它的路径可以在here中找到。我非常确定脚本vcvarsall.bat会在不带参数的情况下调用它时向您显示该选项。

票数 1
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66861346

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档