Hi every body. Iam a new member in the Cuda
I had compiled some program in the NVIDIA project and it can work.
when i make a new project (my project store in the NVIDIA project)
in my project i has a function i had stored it on the *.cu file
global void testKernel( float* g_idata, float* g_odata)
when I build this project I get 2 errors :(
error C2144: syntax error : ‘void’ should be preceded by ‘;’
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
so i type this string before the function
extern “C” global void testKernel( float* g_idata, float* g_odata)
You need to make a build rule for .cu files, as in you need to tell VS to compile .cu files with the nvcc compiler.
There was a thread long time back about the same…so be sure to check it out.
Alternatively you could open any nVidia projects and right click on any .cu file in the solution explorer and inspect its properties. Look for Custom build step and you will know whats going on. That is your .cu build rule.
In the mean-while you can use the template project (or any other existing project) and tailor it to suit your needs.