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)
{
}
But it still did not work. as the same errors External Image
I had made some tutorial on Linux and it worked. :)
but I spend alot of time for cuda on window but it can not work :(
please help me
thank you very much External Image
You should make a copy of the project “template” located in SDK/Project directory, and start from that. Don’t create a project from begin if you are not a expert.
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.
Build log was saved at “file://c:\Documents and Settings\vinh\Desktop\IMAGE PROCESSING PROJECT\b Send data to GPU\NVIDIA CUDA SDK\projects\readcpu to gpu1\Release\BuildLog.htm”
I am sure to say that my function doesn’t has any error, because it was very simple function and i check it many times. and the compiler did not show any error about these function
I try to fix these problems, I found some idear from msdn forums but until now i can’t <img src=‘http://hqnveipbwb20/public/style_emoticons/<#EMO_DIR#>/crying.gif’ class=‘bbc_emoticon’ alt=‘:’(’ />