cuModuleGetFunction in CUDA 2.0 B2 bug Does not accept original function name

Loading kernel function from a module does not work in a way described in the manual. Kernel function “myKernel” can’t be loaded by this name.

I have tried to use the internal name (“_globfunc__Z10myKernelPfS”) that I got from .cubin file, and this way works. However, it’s not convenient to look up in the .cubin file and to pick up a “long” function name.

I use CUDA 2.0 Beta 2, WindowsXP SP2, MS Visual Studio 2003, GeForce 8600GT.

you have to put extern “C” in front of your fuction declaration.

Thanks, it works!