I copied the template.project to be my new CUDA project named “Main_func”…
It’s ok to compile and run the code…
Now, I want to add another *.cu file named " Sub_func.cu "…
“Sub_func.cu” is a sub_function. Because it also uses CUDA function, so it has to include the “cutil.h”.
After adding and compiling this, there’s a warning said ~
" Sub_func.cu Cannot open include file: ‘cutil.h’: No such file or directory "
“Main_func.cu” file also includs “cutil.h” and could be compiled successfully.
But…Why is “Sub_func.cu” compiled unsuccessfully? :wacko:
If you are adding new cu files directly to your project then you need set the build instructions. Go to Main_func.cu and open up its properties and look under Custom Build Step. You will have to set that up for Sub_func.cu.