问题
I have installed CUDA 5 toolkit (32 and 64 bit as that seemed to work) and have made a CUDA runtime project in VS 2010, it compiles fine and runs but I get a red line under the call to the CUDA function.
It isn't a massive deal but it is a little annoying, is there any way to remove this? I'm guessing it is some project setting or some such but I have no idea and neither does Google.
I have attached a screenshot so you know what I am talking about.
Thanks for reading this, I appreciate it.
Kevin

回答1:
From a combination of the answers above (thank you) I have the answer to this question just in case anyone else stumbles upon it.
Basically this is not a compile error, or even an error at all. It is a problem with intellisense and from what I can see, nothing can be done about it, just have to live with it, or hope that one day they add a little more support.
The <<< >>> is the problem and is not correct C++ syntax according to intellisense which favours the C++ compiler. However that code it compiled by the CUDA compiler which intellisense couldn't give a damn about.
I could probably go into more depth about it but read the above comments and search this site as suggested and you will understand.
来源:https://stackoverflow.com/questions/14470108/cuda-5-and-visual-studio-2010-intellisense-error