How to solve this problem?

I create a new Visual studio 2005 c++ project by my self. and copy the following files: matrixMul_kernel.cu, matrixMul.cu, matrixMul.h, matrixMul_gold.cpp from the example project of matrixMul into my new project.

I installed the cuda.rules offered by JaredHoberock. Then I try to run my project.

But I got the following error. please help me thanks

Error 1 error LNK2005: ___device_stub__Z9matrixMulPfS_S_ii already defined in matrixMul_kernel.obj matrixMul.obj

did you exclude the matrixMul_kernel.cu file from being build in your project properties?

Thanks very much. I have solve this problem. best regards

Hi,

I’m trying to duplicate this example and was able to compile it when exclude the “matrixMul_kernel.cu” file. Then, how this example can be executed when the “matrixMul” function is not there?

Also, it cannot locate the “cutil32D.dll” when I try to execute it, but it is in the “C:\Program Fiels\NVIDIA Corporation\NVIDIA CUDA SDK\bin\win32\Debug” directory. Should I add this path to the $CUDA_LIB_PATH environment variable?

Thanks in advance!

Ray

Ignore this! I solve the problem!