I am having this issue with creating a C++ project that has some CUDA code parts using Visual Studio. Currently, I have a solution with 2 projects inside of it. The first is an OpenGL wrapper and the second is some CUDA code for that wrapper. The CUDA part builds with no errors and outputs its lib file. However, when I attempt to build the solution I get the following error:
error C2059: syntax error: ‘<’
I know it’s from the kernel call and I have read about this issue from a few other posts, but most people weren’t building the CUDA code with NVCC and I don’t think that’s my problem. I have read that you need to compile the C++ with g++, cl, etc. and the CUDA with NVCC, then link them with NVCC. How would I do that with Visual Studio? Or if that’s not the case, what am I missing?
Here is a gist of the CUDA file: https://gist.github.com/WaffleMan0310/ee6702f48957c96035b99ae6e5e8e868