I have installed Microsoft C++ Build Tools 2022 to help me compile C files created by Cython. When I install DCNv2, it gives me this error:
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe' failed with exit code 2
Please help as I am not well-rounded with Visual Studio and just need to get my code running.
Thanks
I had a similar problem, when doing a pip install that requires CMake, I had installed Microsoft C++ Build Tools 2022 and got the same error. The fix for this was installing the full Desktop Development with C++ workload using Visual Studio Installer, this resolved the problem of not being able to compile a simple test program.
I am seeing the same error as well, I tried to add this C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe' in PATH to hopefully resolve the issue but it doesn't seem to work. I am not sure whether this issue coming from installing the wrong workload or not. Really hope to tap into the expert group here to resolve this.
Thank you so much.
The C compiler
"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/320216482/source/repos/CMakeProject1/out/build/x64-debug/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe cmTC_1acb3 && [1/2] Building C object CMakeFiles\cmTC_1acb3.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_1acb3.exe
FAILED: cmTC_1acb3.exe
cmd.exe /C "cd . && "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_1acb3.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1434~1.319\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_1acb3.dir\testCCompiler.c.obj /out:cmTC_1acb3.exe /implib:cmTC_1acb3.lib /pdb:cmTC_1acb3.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_1acb3.dir/manifest.res CMakeFiles\cmTC_1acb3.dir/manifest.rc" failed (exit code 0) with the following output:
Le fichier spécifié est introuvable
ninja: build stopped: subcommand failed.
Please someone did you find a solution?
I am having the same issue :
"error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe' failed with exit code 2"
I have already reinstalled Python 3.8.10 after downloading the Desktop Development with C++. I currently have the latest Visual Studio Installer 17.7.4.