Ошибка cmake error in configuration process project files may be invalid

I am currently trying to compile a project in CMake 3.10.0 and it keeps giving the above error box and this

    The C compiler identification is unknown
    The CXX compiler identification is unknown
    CMake Error at CMakeLists.txt:2 (project):
        No CMAKE_C_COMPILER could be found.



    CMake Error at CMakeLists.txt:2 (project):
        No CMAKE_CXX_COMPILER could be found.



    Configuring incomplete, errors occurred!
    See also "C:/build/CMakeFiles/CMakeOutput.log".
    See also "C:/build/CMakeFiles/CMakeError.log".

I am currently running Microsoft Visual Studio 15 2017 and when I am configuring it, I am using x64.

asked Nov 22, 2017 at 20:01

shaddles's user avatar

i had same problem when using vs 2015 but after installing vs 2017 it solved. I think you should repair your visual studio 2017 and try again.
if cmake don`t let you configure with new vs in file tab clear use «delete cache» and try again

answered Aug 11, 2018 at 6:23

N.S's user avatar

N.SN.S

1,34515 silver badges18 bronze badges

1

When you installed Visual Studio 2017, did you install the Visual C++ compilers? It’s not enabled by default. Go to Add or Remove programs and try Repairing/Modifying it to make sure Visual C++ is included.


This is going to sound like a stupid suggestion but if you’ve just installed VS 2017, make sure you’re actually able to compile a sample C++ solution. Yes, you would be surprised by the amount of people I’ve seen with this error that simply didn’t realize their compiler wasn’t installed.


My third suggestion would be to try opening the x86 or x64 Native Tools Command Prompt and try running your CMake build again. The problem, as I’m sure you’ve noticed haha, is that it can’t find your C compilers. Running these Command Prompts will ensure your correct environment variables are set. If this fails, your C compilers are missing and you need to re-install VS2017. If this works that means there’s an issue with your environment PATH.

answered Nov 22, 2017 at 21:01

Chris's user avatar

ChrisChris

2,2348 silver badges22 bronze badges

8

First step, Click the File, select Delete Cache, Second step, Click the Configure, select the VS15 2017, then Done.
enter image description here

enter image description here
enter image description here

answered Mar 23, 2019 at 14:56

Terence Yang's user avatar

To Solve the problem, I just downloaded the last version of the opencv and opencv_contrib repositories(both on the same branch named ‘3.4’).

answered Apr 5, 2020 at 0:29

Breno Medeiros de Oliveira's user avatar

Another version of this error occurred in my case when I wanted to build librealsense from source using cmake, in my case the silly error was providing the source code path in librealsense E:librealsense-2.49.0src rather i should have provided E:librealsense-2.49.0 alone. this worked for me.

answered Oct 12, 2021 at 12:11

Mados's user avatar

MadosMados

538 bronze badges

In my case, I hadn’t selected the correct visual studio version in the configuration panel. Once I did that everything worked correctly.

answered Jun 22, 2022 at 3:30

Jesse's user avatar

JesseJesse

311 silver badge4 bronze badges

Make sure that you named CMakeLists.txt correctly. Once I omitted a ‘s’ at the end of the list, so I got the same error. But when I added ‘s’ it worked well.

desertnaut's user avatar

desertnaut

57.1k23 gold badges137 silver badges165 bronze badges

answered Aug 23, 2022 at 12:40

Ilhom Sadriddinov's user avatar

In addition to checking if I can compile a C++ program and rechecking my Visual Studio components, updating my windows SDK to the new version, I installed a another version of Cmake and it worked.

answered Oct 21, 2022 at 13:19

holouser's user avatar

Caveat: This perhaps too obvious and facile to even post, but since @N.S’s answer made me think to try it, and it worked…

MacOS only: (using 13.1)

  • Problem: Outdated version of CMake not used for a long time causing this error. Has been impossible to fix.
  • Solution: Downloaded newest CMake, replacing outdated CMake. Working.

Xcode 14.2

answered Jan 1 at 21:32

Mote Zart's user avatar

Mote ZartMote Zart

8433 gold badges17 silver badges33 bronze badges

I am currently trying to compile a project in CMake 3.10.0 and it keeps giving the above error box and this

    The C compiler identification is unknown
    The CXX compiler identification is unknown
    CMake Error at CMakeLists.txt:2 (project):
        No CMAKE_C_COMPILER could be found.



    CMake Error at CMakeLists.txt:2 (project):
        No CMAKE_CXX_COMPILER could be found.



    Configuring incomplete, errors occurred!
    See also "C:/build/CMakeFiles/CMakeOutput.log".
    See also "C:/build/CMakeFiles/CMakeError.log".

I am currently running Microsoft Visual Studio 15 2017 and when I am configuring it, I am using x64.

asked Nov 22, 2017 at 20:01

shaddles's user avatar

i had same problem when using vs 2015 but after installing vs 2017 it solved. I think you should repair your visual studio 2017 and try again.
if cmake don`t let you configure with new vs in file tab clear use «delete cache» and try again

answered Aug 11, 2018 at 6:23

N.S's user avatar

N.SN.S

1,34515 silver badges18 bronze badges

1

When you installed Visual Studio 2017, did you install the Visual C++ compilers? It’s not enabled by default. Go to Add or Remove programs and try Repairing/Modifying it to make sure Visual C++ is included.


This is going to sound like a stupid suggestion but if you’ve just installed VS 2017, make sure you’re actually able to compile a sample C++ solution. Yes, you would be surprised by the amount of people I’ve seen with this error that simply didn’t realize their compiler wasn’t installed.


My third suggestion would be to try opening the x86 or x64 Native Tools Command Prompt and try running your CMake build again. The problem, as I’m sure you’ve noticed haha, is that it can’t find your C compilers. Running these Command Prompts will ensure your correct environment variables are set. If this fails, your C compilers are missing and you need to re-install VS2017. If this works that means there’s an issue with your environment PATH.

answered Nov 22, 2017 at 21:01

Chris's user avatar

ChrisChris

2,2348 silver badges22 bronze badges

8

First step, Click the File, select Delete Cache, Second step, Click the Configure, select the VS15 2017, then Done.
enter image description here

enter image description here
enter image description here

answered Mar 23, 2019 at 14:56

Terence Yang's user avatar

To Solve the problem, I just downloaded the last version of the opencv and opencv_contrib repositories(both on the same branch named ‘3.4’).

answered Apr 5, 2020 at 0:29

Breno Medeiros de Oliveira's user avatar

Another version of this error occurred in my case when I wanted to build librealsense from source using cmake, in my case the silly error was providing the source code path in librealsense E:librealsense-2.49.0src rather i should have provided E:librealsense-2.49.0 alone. this worked for me.

answered Oct 12, 2021 at 12:11

Mados's user avatar

MadosMados

538 bronze badges

In my case, I hadn’t selected the correct visual studio version in the configuration panel. Once I did that everything worked correctly.

answered Jun 22, 2022 at 3:30

Jesse's user avatar

JesseJesse

311 silver badge4 bronze badges

Make sure that you named CMakeLists.txt correctly. Once I omitted a ‘s’ at the end of the list, so I got the same error. But when I added ‘s’ it worked well.

desertnaut's user avatar

desertnaut

57.1k23 gold badges137 silver badges165 bronze badges

answered Aug 23, 2022 at 12:40

Ilhom Sadriddinov's user avatar

In addition to checking if I can compile a C++ program and rechecking my Visual Studio components, updating my windows SDK to the new version, I installed a another version of Cmake and it worked.

answered Oct 21, 2022 at 13:19

holouser's user avatar

Caveat: This perhaps too obvious and facile to even post, but since @N.S’s answer made me think to try it, and it worked…

MacOS only: (using 13.1)

  • Problem: Outdated version of CMake not used for a long time causing this error. Has been impossible to fix.
  • Solution: Downloaded newest CMake, replacing outdated CMake. Working.

Xcode 14.2

answered Jan 1 at 21:32

Mote Zart's user avatar

Mote ZartMote Zart

8433 gold badges17 silver badges33 bronze badges

It is very strange that following the installation steps of others, there is a problem, (OK, actually I was in the process of installation, I was typing, I don’t know, press the wrong button)

You can check for specific errors in Cmake:

Boost_root is an environment variable that should be used in the process of installing BOOSTPRO. The BOOST_ROOT is an environment variable that should be used in the process of installing BOOSTPRO. The BOOST_ROOT is an environment variable. I added myself to this file

//Configure CMake// Configure

Reference:
【 1 】 http://boostpro.com/download/boost_1_47_setup.exe
【 2 】 Cmake always find a Boost libraries at http://stackoverflow.com/questions/19303430/cmake-cannot-find-boost-libraries
[3] solution: CMake compile time appear the error in the configuration process project files may be invalid at http://blog.sina.com.cn/s/blog_a2d9d5c60100y1at.html

Read More:

  • Problems in compiling VTK with cmake: solutions to error configuration process, project files may be invalid
  • “Error in configuration process project files may be invalid” appears during cmake compilation
  • Solution: when cmake is compiled, “error in configuration process project files may be invalid” appears
  • To solve problems in cmake VTK: error configuration process, project files may be invalid
  • windows CMake error: error in configuration process, project files may be invalid
  • Error in configuration process, project files may be invalid in cmake compilation
  • Error resolution-“Error in configuration process, project files may be invalid” appears when Cmake compiles openCV
  • When cmake is compiled, “error in configuration process project files may be invalid” appears
  • Error configuration process and project file may be invalid appear in cmake compilation
  • To solve the problem in Windows opencv installation: error configuration process, project files may be invalid
  • Error configuration process, project files may be invalid
  • Project files may be invalid appears when cmake compiles opencv3.1, and the debug additional dependency of the compiled opencv3.1 is at the end
  • CMake Error at CMakeLists.txt:5 (PROJECT): The CMAKE_C_COMPILER: cl is not a full path
  • Brief introduction of cmake generating all in vs Project_ BUILD、INSTALL、ZERO_ Check function!!
  • JOM error 2 problem when qtcreator uses cmake to build a project
  • [actual record of Android stepping on the pit] Android studio reports an error invalid gradle JDK configuration found after importing the project
  • The CXX compiler identification is unknown CMake Error at CMakeLists.txt:11 (project):
  • gazebo7 CMake Error:Could not find a package configuration file provided by “gazebo_plugins“
  • The requested page cannot be accessed because the related configuration data for the page is invalid
  • CodeBlocks OpenGL configuration process

Hello,

the project configuration in Windows causes errors, the project file for the visual studio is not created.

Visual Studio 2022 Ent, CMake 3.25.2, Windows 10, llvm-15.0.7.src.tar.xz


Error

Error in configuration process, project files may be invalid

OK

CMake Error at CMakeLists.txt:327 (include):
include could not find requested file:

CMake Error at cmake/modules/CMakeLists.txt:1 (include):
include could not find requested file:

CMake Error at cmake/modules/CMakeLists.txt:3 (include):
include could not find requested file:

CMake Error at cmake/modules/CMakeLists.txt:116 (find_prefix_from_config):
Unknown CMake command «find_prefix_from_config».

Configuring incomplete, errors occurred!

CMake Discourse

Loading

  • Ошибка cls launched application does not respond
  • Ошибка clr 8007000e работа программы будет прекращена
  • Ошибка clr 8007000e cyberpunk 2077
  • Ошибка clr 80070005 работа программы будет прекращена киберпанк
  • Ошибка clr 80070005 работа программы будет прекращена windows 10