Feb 16 2009
Intellisense for CUDA in VS 2008
In the previous post I have written about using CUDA from Visual Studio IDE. Syntax highlighting is very easy to achieve – because nVidia delivers files and information about enabling syntax highlighting for CUDA in CUDA SDK. The thing is, that when you start developing anything that uses CUDA, you feel like being back in the mid ‘90 – there is no Intellisense, no auto-completion and other features of modern IDEs that most of developers are used to. 5 sec googling and you got the solution. But hey… why doesn’t it work? Well I think it is because someone who wrote about it had special pack of Unix programs for Windows installed (Cygwin). There are no “rm” or “cp” commands under Windows (at least on my copy of Windows they seem to not exist ;) The easiest way to make it work under any Windows is to replace:
rm $(InputName).cu
cp $(InputFileName) $(InputName).cu
with:
copy /Y $(InputFileName) $(InputName).cu
That’s it. It should work now. And remember that you need to have both files (.c and .cu) in your solution (because the idea behind it is to generate .cu from .c, and compile only .cu).
Anyway, that shows how powerful the Custom Build Rules are, aren’t they?








