Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure for basic example #43633

Closed
Clouud9 opened this issue Feb 5, 2025 · 1 comment
Closed

Build failure for basic example #43633

Clouud9 opened this issue Feb 5, 2025 · 1 comment
Labels
category:question This issue is a question

Comments

@Clouud9
Copy link

Clouud9 commented Feb 5, 2025

Description
Currently my the simple example that was given by Microsoft doesn't seem to work on my system, and I keep getting various build errors as a result. The only way to avoid ninja giving an CreateProcess error is to disable the antivirus on the computer, as well. That's the only way I've been even able to get this far building a simple program.

Environment

  • OS: Windows 11
  • Compiler: cl

To Reproduce
Steps to reproduce the behavior:

  1. cmake --presets=default
  2. See error

Expected behavior
A clear and concise description of what you expected to happen.

Failure logs

CMake Error at C:/Users/(User)/Base/Programs/cmake-3.31.5-windows-x86_64/share/cmake-3.31/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler

"C:/Program Files/Microsoft Visual Studio/2022/Preview/VC/Tools/MSVC/14.43.34618/bin/Hostx64/x64/cl.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: 'C:/Users/(User)/CTKTest/build/CMakeFiles/CMakeScratch/TryCompile-o8oyc3'

Run Build Command(s): C:/Users/(User)/Base/Programs/ninja.exe -v cmTC_06228
[1/2] C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1443~1.346\bin\Hostx64\x64\cl.exe  /nologo   /DWIN32 /D_WINDOWS /W3  /MDd /Zi /Ob0 /Od /RTC1 /showIncludes /FoCMakeFiles\cmTC_06228.dir\testCCompiler.c.obj /FdCMakeFiles\cmTC_06228.dir\ /FS -c C:\Users\(User)\CTKTest\build\CMakeFiles\CMakeScratch\TryCompile-o8oyc3\testCCompiler.c
[2/2] C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Users\(User)\Base\Programs\cmake-3.31.5-windows-x86_64\bin\cmake.exe -E vs_link_exe --msvc-ver=1943 --intdir=CMakeFiles\cmTC_06228.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1443~1.346\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_06228.dir\testCCompiler.c.obj  /out:cmTC_06228.exe /implib:cmTC_06228.lib /pdb:cmTC_06228.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FAILED: cmTC_06228.exe
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\Users\(User)\Base\Programs\cmake-3.31.5-windows-x86_64\bin\cmake.exe -E vs_link_exe --msvc-ver=1943 --intdir=CMakeFiles\cmTC_06228.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests  -- C:\PROGRA~1\MIB055~1\2022\Preview\VC\Tools\MSVC\1443~1.346\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_06228.dir\testCCompiler.c.obj  /out:cmTC_06228.exe /implib:cmTC_06228.lib /pdb:cmTC_06228.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
RC Pass 1: command "rc /fo CMakeFiles\cmTC_06228.dir/manifest.res CMakeFiles\cmTC_06228.dir/manifest.rc" failed (exit code 0) with the following output:       
no such file or directory
ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:5 (project)

-- Configuring incomplete, errors occurred!

Additional context

Copy link

github-actions bot commented Feb 5, 2025

Thanks for posting this issue. Please make sure you have the following installed.

  • Visual Studio Desktop development with C++.
  • Windows 10 SDK or Windows 11 SDK.

@github-actions github-actions bot added the category:question This issue is a question label Feb 5, 2025
@github-actions github-actions bot closed this as completed Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

1 participant