Today I installed CUDA 9 with the Visual Studio 2017 integration. When creating a new CUDA 9 project and building, I got the error:
Error C1189 #error: – unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported!
With some debugging, I found that on line 131 of file host_config.h in directory “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include\crt” only supports a max _MSC_VER of 1910. Since Visual Studio 2017 is reporting version 1911, I changed the line to:
#if _MSC_VER < 1600 || _MSC_VER > 1911
And now the new project will build and run.
I hope this tip is helpful to some. I’m just starting off with CUDA (spent 3 days getting it installed and currently working through some Hello World samples), so I apologize if this tip is very elementary for some.