Search code examples
makefilevisual-studio-2017command-promptwebpcl.exe

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


I'm trying to build libwebp.dll for webp, using these instructions (I downloaded this source code)

However, I'm getting the error:

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

on command nmake /f Makefile.vc CFG=release-dynamic RTLIBCFG=dynamic OBJDIR=output in the Developer Command Prompt for Visual Studio 2017 (Community Edition).

I don't see file cl.exe anywhere in C:\Program Files (x86)\Microsoft Visual Studio 14.0

How can I fix this?


Solution

  • Turns out I had to install Visual C++. See this post: Visual studio doesn't have cl.exe

    After that I could use this command and it works:

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