CMake does not find Visual C++ compiler

前端 未结 27 2400
小鲜肉
小鲜肉 2020-11-29 18:51

After installing Visual Studio 2015 and running CMake on a previous project, CMake errors stating that it could not find the C compiler.

The C compiler ident         


        
27条回答
  •  我在风中等你
    2020-11-29 19:16

    Here is the solution that worked for me:

    1. Open Visual Studio command prompt tool (as an administrator). On windows 10 it might be called 'Developer command prompt'.
    2. Navigate to where you have the CMake executable
    3. Run Cmake.exe
    4. Proceed as usual to select build and source folder
    5. Select the appropriate Visual Studio compiler and hit the configure button

    Hopefully it should run without problems.

提交回复
热议问题