Hello Folks,
I’m working with the CUDA samples found here: https://github.com/NVIDIA/cuda-samples
When I go to build in Visual Studio 2022, I get hit with this error:
nvcc fatal : Host compiler targets unsupported OS.
The whole commandline instruction is the following:
----BEGIN COMMAND-----
“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\bin\nvcc.exe” -gencode=arch=compute_50,code="sm_50,compute_50" -gencode=arch=compute_52,code="sm_52,compute_52" -gencode=arch=compute_60,code="sm_60,compute_60" -gencode=arch=compute_61,code="sm_61,compute_61" -gencode=arch=compute_70,code="sm_70,compute_70" -gencode=arch=compute_75,code="sm_75,compute_75" -gencode=arch=compute_80,code="sm_80,compute_80" -gencode=arch=compute_86,code="sm_86,compute_86" -gencode=arch=compute_89,code="sm_89,compute_89" -gencode=arch=compute_90,code="sm_90,compute_90" --use-local-env -ccbin “C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130\bin\HostX64\x64” -x cu -I./ -I…/…/…/Common -I./ -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3/include" -I…/…/…/Common -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.3\include" -G --keep-dir x64\Debug -maxrregcount=0 --machine 64 --compile -cudart static -Xcompiler “/wd 4819” --threads 0 -g -DWIN32 -DWIN32 -D_MBCS -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FS /Zi /RTC1 /MTd " -Xcompiler “/Fdx64/Debug/vc143.pdb” -o C:\Users\somename\source\repos\cuda-samples\Samples\0_Introduction\asyncAPI\x64\Debug\asyncAPI.cu.obj “C:\Users\somename\source\repos\cuda-samples\Samples\0_Introduction\asyncAPI\asyncAPI.cu”
----END COMMAND-----
Some of the questions similar to mine have talked about “cl.exe” being found in the Visual Studio location referenced with -ccbin, and I do see the cl.exe.
What should my next steps be in debugging this issue?