Let's say I have three files: test.h, test.c and kernels.cu. I'm using CUDA in this project and have the nvcc compiler set up right (it compiles some test projects I've tried without flaw) within code::blocks.
I initialize cuda_setup() in test.h and then declare cuda_setup() in kernels.cu. The compiler compiles everything, including the .cu file, into an object file but then seems to refuse to actually link it together with the rest of the project. If i put the cuda_setup() declaration in another .c file of the project I have no problems and if I rename the .cu file into a .c file while removing the CUDA kernel I have no problem.
If I make any errors in the .cu file it complains at me and I can see that it makes a kernels.o file. I'm at a complete loss for what I have to do to get my project to use the .cu file. I'm thinking its a problem with how Code::Blocks sets up the command to link .cu files but I can't seem to get any information about that from the interface.
I'm trying to solve this problem by making my own Makefile but am running into a host of other problems. Is there a way I can see what command Code::Blocks is actually using to compile my project?