‘cl’ is not recognized as an internal or external command,

That error happens because cl isn’t in your path. You need to add it there. The recommended way to do this is to launch a developer command prompt.

Quoting the article Use the Microsoft C++ toolset from the command line:

  1. On the desktop, open the Windows Start menu. In Windows 11, choose the All apps button to open the list of installed apps. In Windows 10,
    the list is open to the left. Scroll down the list to find and open
    the folder (not the app) for your version of Visual Studio, for
    example, Visual Studio 2022.

  2. In the folder, choose the Developer Command Prompt for your version of Visual Studio. This shortcut starts a developer command
    prompt window that uses the default build architecture of 32-bit,
    x86-native tools to build 32-bit, x86-native code. If you prefer a
    non-default build architecture, choose one of the native or cross
    tools command prompts to specify the host and target architecture.

For an even faster way to open a developer command prompt, enter
developer command prompt in the desktop search box. Then choose the
result you want.

As the article notes, there are several different shortcuts for setting up different toolsets – you need to pick the suitable one.

If you already have a plain Command Prompt window open, you can run the batch file vcvarsall.bat with the appropriate argument to set up the environment variables. Quoting the same article:

  1. At the command prompt, use the CD command to change to the Visual Studio installation directory. Then, use CD again to change to the
    subdirectory that contains the configuration-specific command files.
    For Visual Studio 2019 and Visual Studio 2017, use the
    VC\Auxiliary\Build subdirectory. For Visual Studio 2015, use the VC
    subdirectory.

  2. Enter the command for your preferred developer environment. For example, to build ARM code for UWP on a 64-bit platform, using the
    latest Windows SDK and Visual Studio compiler toolset, use this
    command line:

    vcvarsall.bat amd64_arm uwp
    

From the article, the possible values for the first argument are the following:

  • x86 (x86 32-bit native)
  • x86_amd64 or x86_x64 (x64 on x86 cross)
  • x86_arm (ARM on x86 cross)
  • x86_arm64 (ARM64 on x86 cross)
  • amd64 or x64 (x64 64-bit native)
  • amd64_x86 or x64_x86 (x86 on x64 cross)
  • amd64_arm or x64_arm (ARM on x64 cross)
  • amd64_arm64 or x64_arm64 (ARM64 on x64 cross)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)