[cuda] unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported!
my cuda system:
hardware: ASUS geforce gtx 1050–2G
motherboard: ASUS H81M-E
CPU: Intel core i3 4130
RAM: 16GM
system: windows 10 home
after install visual studio 2017 community and cuda9.2
i run the example code from cuda
PS:
1.you must install visual studio 2017 before Nvidia cuda 9.2!
2. c drive should have the capacity about 30GB.
erros message :
Error C1189 #error: — unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported! test1 c:\program files\nvidia gpu computing toolkit\cuda\v9.2\include\crt\host_config.h 133
Error MSB3721 The command “”C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\bin\nvcc.exe” -gencode=arch=compute_30,code=\”sm_30,compute_30\” — use-local-env -ccbin “C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64” -x cu -I”C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include” -I”C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\include” -G — keep-dir x64\Debug -maxrregcount=0 — machine 64 — compile -cudart static -g -DWIN32 -DWIN64 -D_DEBUG -D_CONSOLE -D_MBCS -Xcompiler “/EHsc /W3 /nologo /Od /FS /Zi /RTC1 /MDd “ -o x64\Debug\kernel.cu.obj “C:\Users\jameskrauser\source\repos\test1\test1\kernel.cu”” exited with code 2. test1 C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\CUDA 9.2.targets 707
Solution:
/Configuration Properties / General / Platform Toolset /
change to Visual Studio 2015(V140)