-1

I try to get into the Optix projects and I have a problem with recognizing the Cuda code in the Visual Studio 2017. I can build and execute the code (even the code in the .cu files), but variables and functions in .cu files, are marked as not recognized (are colored red). Is it possible to fix this issue?

waffle
  • 1

1 Answers1

-2

Because the cuda program is compiled with nvcc.exe (it can be simply understood as c compilation). If the .cpp file contains the .cu file, the .cu file will be compiled with the c++ compiler. I suggest that you could add extern "C" in front of the functions which is called in the .cu file.

Barrnet Chou
  • 1,738
  • 1
  • 4
  • 7