Errors messages due to the cuda rules ?

Hi every one,
I’m new by Cuda and I downloaded the CUDA Toolkit 3.2 RC2 on my Windows XP machine and I
tested successfully “the bandwidth Test” and other examples. I also added in Visual Studio 2008 the cuda rules
in the folder C:\Programs\Microsoft Visual Studio 9.0\VC\VCProjectDefaults. There are actually
4 rules data :NvCudaDriverApi.rules,NvCudaDriverApi.v3.2.rules,NvCudaRuntimeApi.rules and NvCudaRuntimeApi.v3.2.rules.
I selected the custom build rules in the project explorer and checked the NvCudaRuntimeApi.v3.2.rules.
I compiled the following files:

//test.cpp file

#include
#include “cuda.h”
#include “host_defines.h”
#include “cuda_runtime.h”
#include “device_launch_parameters.h”
#include “driver_types.h”
#include “common_functions.h”
#include “host_config.h”
#include “host_runtime.h”
#include “driver_functions.h”
#include “func_macro.h”

#pragma comment (lib, “cuda.lib”)

using namespace std

global void add(int a, int b, int *c){
*c=a+b;
}

int main(){
int c;
int *dev_c;

cudaMalloc((void**)&dev_c, sizeof(int));
add<<<1,1>>>(2,7,dev_c);

cudaMemcpy(&c,dev_c,sizeof(int),cudaMemcpyDeviceToHost);

printf(“2+7=%d\n”,c);
cudaFree(dev_c);

return 0;
}

//test.cu file

#include “cuda_runtime.h”
#include “device_launch_parameters.h”
#include “driver_types.h”
#include “common_functions.h”
#include “host_config.h”
#include “host_runtime.h”
#include “driver_functions.h”
#include “func_macro.h”

#pragma comment (lib, “cuda.lib”)

using namespace std

global void add(int a, int b, int *c){
*c=a+b;
}

int main(){
int c;
int *dev_c;

cudaMalloc((void**)&dev_c, sizeof(int));
add<<<1,1>>>(2,7,dev_c);

cudaMemcpy(&c,dev_c,sizeof(int),cudaMemcpyDeviceToHost);

printf(“2+7=%d\n”,c);
cudaFree(dev_c);
return 0;
}
and I had the error message:
error PRJ0019: a tool returned an error code from the following source: “Compiling with CUDA Build Rule…”

does someone have an idea what I’m doing wrong???

Thank you

Hi every one,
I’m new by Cuda and I downloaded the CUDA Toolkit 3.2 RC2 on my Windows XP machine and I
tested successfully “the bandwidth Test” and other examples. I also added in Visual Studio 2008 the cuda rules
in the folder C:\Programs\Microsoft Visual Studio 9.0\VC\VCProjectDefaults. There are actually
4 rules data :NvCudaDriverApi.rules,NvCudaDriverApi.v3.2.rules,NvCudaRuntimeApi.rules and NvCudaRuntimeApi.v3.2.rules.
I selected the custom build rules in the project explorer and checked the NvCudaRuntimeApi.v3.2.rules.
I compiled the following files:

//test.cpp file

#include
#include “cuda.h”
#include “host_defines.h”
#include “cuda_runtime.h”
#include “device_launch_parameters.h”
#include “driver_types.h”
#include “common_functions.h”
#include “host_config.h”
#include “host_runtime.h”
#include “driver_functions.h”
#include “func_macro.h”

#pragma comment (lib, “cuda.lib”)

using namespace std

global void add(int a, int b, int *c){
*c=a+b;
}

int main(){
int c;
int *dev_c;

cudaMalloc((void**)&dev_c, sizeof(int));
add<<<1,1>>>(2,7,dev_c);

cudaMemcpy(&c,dev_c,sizeof(int),cudaMemcpyDeviceToHost);

printf(“2+7=%d\n”,c);
cudaFree(dev_c);

return 0;
}

//test.cu file

#include “cuda_runtime.h”
#include “device_launch_parameters.h”
#include “driver_types.h”
#include “common_functions.h”
#include “host_config.h”
#include “host_runtime.h”
#include “driver_functions.h”
#include “func_macro.h”

#pragma comment (lib, “cuda.lib”)

using namespace std

global void add(int a, int b, int *c){
*c=a+b;
}

int main(){
int c;
int *dev_c;

cudaMalloc((void**)&dev_c, sizeof(int));
add<<<1,1>>>(2,7,dev_c);

cudaMemcpy(&c,dev_c,sizeof(int),cudaMemcpyDeviceToHost);

printf(“2+7=%d\n”,c);
cudaFree(dev_c);
return 0;
}
and I had the error message:
error PRJ0019: a tool returned an error code from the following source: “Compiling with CUDA Build Rule…”

does someone have an idea what I’m doing wrong???

Thank you

I fixed the error!! i saw what I was doing wrong!!!

I fixed the error!! i saw what I was doing wrong!!!