How to set cmake CXX variable on windows

前端 未结 5 824
闹比i
闹比i 2021-01-18 01:35

I am getting the following error

Working on: Microsoft Windows [Versión 6.1.7601]

ErrorS:

CMake Warning at CMakeLists.txt:4 (project):
  To u         


        
相关标签:
5条回答
  • 2021-01-18 02:05

    Try to use "Visual Studio Command Prompt" (vcvarsall.bat)

    0 讨论(0)
  • 2021-01-18 02:05

    I ran into the same problem. I realized that cl does not come with Visual Studio 2015, but when I installed the 2013 express, it worked.

    Use the "Visual Studio 2013" -> "Visual Studio Tools" -> "VS2013 x64 Cross Tools Command Prompt".

    0 讨论(0)
  • 2021-01-18 02:07

    Please note that I resolved the problem by adding this to my PATH environment variable where I have Visual Studio 2019 installed:

    C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\Hostx64\x64
    
    0 讨论(0)
  • 2021-01-18 02:07

    As others said you can either run cmake in "Visual Studio Command Prompt" form the path @Miles said or (better way) add the path of visual studio compiler to your path. Check this path:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin and find it in your computer, then add it in your PATH environment variable.

    0 讨论(0)
  • 2021-01-18 02:26

    You need to run the batch script provided by Visual Studio to set up your environment before running cmake. It's under X:\Visual\Studio\Dir\VC\vcvarsall.bat. There should also be a shortcut in the start menu for "Visual Studio Command Prompt" that will open a prompt and automatically run vcvarsall.bat.

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