relation .h and .cu example matrixMul

Hi,
In the example of NVIDIA_CUDA_SDK, called matrixMul, we’ve matrixMul.cu, matrixMul.h, matrixMul_gold.cpp, matrixMul_kernel.cu and Makefile. Looking into the makefile I can see only 2 of 4 files (matrixMul.cu and matrixMul_gold.cpp). So where are matrixMul.h and matrixMul_kernel?
When we are compiling only on C is assumed the relation between a file.c and file.h. So is the same between matrixMul.cu and matrixMu.h?? and matrixMul_kernel.cu??

thank you

There is never any assumed relation between file.c and file.h. Any header file inclusions are done via the #include pre-processor directive. If you look into matrixMul.cu, you will see that it #includes both the .h and the _kernel file.

OK! thank you.

But now I’ve a problem at the compile time. I’ve created a library with matrixMul. My intention is call from a simple main program to library function. the problem is in cutil but I don’t know why!

I put this for linker main and library on my makefile:

-L/usr/local/cuda/lib -L/home/username/NVIDIA_CUDA_SDK/lib -L/home/username/NVIDIA_CUDA_SDK/common/lib/linux -lcudart -L/usr/local/cuda/lib -L/home/username/NVIDIA_CUDA_SDK/lib -L/home/username/NVIDIA_CUDA_SDK/common/lib/linux -lcutil

but I obtain many errors with undefined reference to `cudaMemcpy, cudaFree, cutDeleteTimer…