Device stubs are C++ mangled __device_stub__my_kernelZ12PfS_S_mmif


I got a strange problem with CUDA 1.1, all the device stubs have C++ names instead of what you get with extern “C”. For instance I got a


whereas in CUDA 1.0 I simply got a


function in the generated object files. This can even be seen compiling with

nvcc --cuda

and viewing the C generated code. This is a problem for instance with PyStream (a Python interface for CUDA) which only considers plain C names. I tried to add

--host-compilation c

but this is the default already.


Declare the kernel

extern "C" __global__ void kernel(args...)

and everything should be fine.

Thanks [font=“Courier”]extern “C”[/font] works perferctly.