[CMAKE] Cannot open source file: 'CMakeCCompilerId.c': No such file or directory

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
Zeilos
Posts: 2
Joined: 26 Mar 2019, 20:55
Gitlab profile: https://github.com/Ben-Floyd

[CMAKE] Cannot open source file: 'CMakeCCompilerId.c': No such file or directory

Post by Zeilos » 27 Mar 2019, 22:13

I'm running Windows 10 on an 8th gen intel i7. I followed the instructions on the wiki for VS but after I ran

Code: Select all

CI/before_script.msvc.sh -k -p Win64 -v 2017
the .sln file was not created in openmw\MSVC2017_64. I checked openmw\MSVC2017_64\output.log.

Code: Select all

-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.17134.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:30 (project):
  No CMAKE_C_COMPILER could be found.



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



-- Configuring incomplete, errors occurred!
See also "C:/[PATH]/openmw/MSVC2017_64/CMakeFiles/CMakeOutput.log".
See also "C:/[PATH]/openmw/MSVC2017_64/CMakeFiles/CMakeError.log".
I then checked openmw\MSVC2017_64\CMakeFiles/CMakeError.log

Code: Select all

Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:  
Build flags: 
Id flags:  

The output was:
1
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 3/27/2019 2:33:12 PM.
Project "C:\[PATH]\openmw\MSVC2017_64\CMakeFiles\3.14.0\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
  Creating directory "Debug\".
  Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
  Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:classic /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc141.pdb" /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
  CMakeCCompilerId.c
c1 : fatal error C1083: Cannot open source file: 'CMakeCCompilerId.c': No such file or directory [C:\[PATH]\openmw\MSVC2017_64\CMakeFiles\3.14.0\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "C:\[PATH]\openmw\MSVC2017_64\CMakeFiles\3.14.0\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\[PATH]\openmw\MSVC2017_64\CMakeFiles\3.14.0\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(ClCompile target) -> 
  c1 : fatal error C1083: Cannot open source file: 'CMakeCCompilerId.c': No such file or directory [C:\[PATH]\openmw\MSVC2017_64\CMakeFiles\3.14.0\CompilerIdC\CompilerIdC.vcxproj]

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.18
I just updated VS 2017 and made sure it had the C++ desktop module. Any suggestions?

User avatar
AnyOldName3
Posts: 1561
Joined: 26 Nov 2015, 03:25

Re: [CMAKE] Cannot open source file: 'CMakeCCompilerId.c': No such file or directory

Post by AnyOldName3 » 28 Mar 2019, 00:44

Maybe try reinstalling CMake, too, and if that doesn't work, reinstall VS again. I used to have issues like this with lots of projects when VS 2017 was new, and after a zillion reinstalls, it eventually stopped happening.
AnyOldName3, Master of Shadows

Zeilos
Posts: 2
Joined: 26 Mar 2019, 20:55
Gitlab profile: https://github.com/Ben-Floyd

Re: [CMAKE] Cannot open source file: 'CMakeCCompilerId.c': No such file or directory

Post by Zeilos » 28 Mar 2019, 18:00

Thanks! I just reinstalled CMake. The first time i used the zip and manually added it. This time i used the msi and it worked.

Post Reply