Visual Studio 2015 doesn't have cl.exe

前端 未结 3 1207
醉酒成梦
醉酒成梦 2020-11-27 12:35

I downloaded Visual C++ and Visual Studio, but I cannot find cl.exe to compile my C++ file. The path to the install is `C:\\Program Files (x86)\\Microsoft Visu

相关标签:
3条回答
  • 2020-11-27 13:16

    For me that have Visual Studio 2015 this works:
    Search this in the start menu: Developer Command Prompt for VS2015 and run the program in the search result.
    You can now execute your command in it, for example: cl /?

    0 讨论(0)
  • 2020-11-27 13:18

    In Visual Studio 2019 you can find cl.exe inside

    32-BIT : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\Hostx86\x86
    64-BIT : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.20.27508\bin\Hostx64\x64
    

    Before trying to compile either run vcvars32 for 32-Bit compilation or vcvars64 for 64-Bit.

    32-BIT : "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
    64-BIT : "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
    

    If you can't find the file or the directory, try going to C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC and see if you can find a folder with a version number. If you can't, then you probably haven't installed C++ through the Visual Studio Installation yet.

    0 讨论(0)
  • 2020-11-27 13:30

    Visual Studio 2015 doesn't install C++ by default. You have to rerun the setup, select Modify and then check Programming Language -> C++

    0 讨论(0)
提交回复
热议问题