Makefile.vc(18):致命错误 U1050:无法自动检测工具链架构!如果 cl.exe 在您的 PATH 中,请使用 ARCH=<arch> 重新运行 nmake。停止

Makefile.vc(18) : fatal error U1050: Unable to auto-detect toolchain architecture! If cl.exe is in your PATH rerun nmake with ARCH=<arch>. Stop

我正在尝试为 webp 构建 libwebp.dll,使用 these instructions (I downloaded this source code)

但是,我收到错误消息:

Makefile.vc(18) : fatal error U1050: Unable to auto-detect toolchain architecture! If cl.exe is in your PATH rerun nmake with ARCH=. Stop.`

在 Visual Studio 2017(社区版)的开发人员命令提示中的命令 nmake /f Makefile.vc CFG=release-dynamic RTLIBCFG=dynamic OBJDIR=output

我在 C:\Program Files (x86)\Microsoft Visual Studio 14.0

中的任何地方都没有看到文件 cl.exe

我该如何解决这个问题?

原来我必须安装 Visual C++。看到这个post:

之后我可以使用这个命令并且它起作用了:

nmake /f Makefile.vc CFG=release-dynamic RTLIBCFG=dynamic OBJDIR=output ARCH=x64