CUDA based DLL

How bulid and compile C library with cuda functions?

Write a source code using e.g. driver API and compile it with Visual Studio 2010? :)
Don’t You think the question is too general?

MK

(1) In case you want to create a library of host-callable functions (host wrapper functions with underlying GPU kernels), like the original CUBLAS or CUFFT libraries, you would create it just like a DLL consisting only of CPU code. You are not limited to the CUDA driver API. You can use the CUDA runtime API, in fact that is what CUBLAS and CUFFT have used since they were created more than six years ago. I would suggest using the CUDA runtime.

(2) In case you want to create a library of device-callable functions, only static libraries of that nature are currently supported. You will need CUDA 5.0 for the necessary linker support, as well as a device with compute capability 3.5 to be able to invoke GPU kernels from other kernels.