0

I am currently using Visual studios 2019 with CUDA. However, when I create or open any CUDA file things are underlined in red and marked as "errors" when in reality everything works perfectly fine and the compiler throws no errors. For example: enter image description here

Is there a way to add CUDA's compiler, nvcc, to visual studios so I won't get these annoying error messages? Or is this completely impossible and something I have to live with? Also, if it helps I am using CMake with the Ninja compiler.

capslpop
  • 73
  • 9
  • This is an old and much discussed problem, and there is no real fix – talonmies Jan 23 '21 at 01:42
  • @talonmies Oh, I do not have any issue with "<< " and ">>" operators. I can live with those. But my problem is that anything I type that is specific to CUDA is underlined in red. For example, __global__ is underlined in red despite compiling correctly. – capslpop Jan 25 '21 at 03:36
  • It is the same problem. Visual Studio and Visual Studio Code intellisense only works reliably for plain vanilla C++. It doesn't know anything about CUDA syntax and it can't be modified to parse it without indicating errors. – talonmies Jan 25 '21 at 03:44

0 Answers0