Direct Question: Is it possible to enable syntax highlighting for CUDA 7.0 in Visual Studio 2013, and if so, how does one do it?
Background:
I tried to follow this guide, but can't find a usertype.dat
file (does it still ship with this version?). I didn't find the file at the locations mentioned in 1, 2, 3.
Try The following Steps
To set syntax highlighting support for your Visual Studio CUDA Project, make the following steps:
• Go to: Tools -> Options -> Project and Solutions -> VC++ Project Settings -> Extensions to Include -> add “.cu” (and “.cuh” if you like);
• Go to: Project -> Properties -> Configuration Properties -> VC++ Directories -> Include Directories -> add $(CUDA_INC_PATH)
• Go to: Tools –> Options -> Text Editor -> File Extension -> add “cu” to Extension, select Microsoft Visual C++ as Editor and then OK
• Copy usertype.dat from C:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.0\doc\syntax_highlighting\visual_studio_8 to C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
The first step will make Visual Studio 2010 know that cu should be dealt with in a similar way as cpp file.
The second step will enable right click on a CUDA header file and select Open Document.
The third step will enable standard keyword coloring on .cu files.
The fourth step will extend the coloring to CUDA keywords.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With