error: `__device_stub___globfunc__' undeclared NVCC compilation issue

Hello all,

I am having a really hard time compiling this code. When I try to compile it with nvcc I see a weird error. I have searched the internet (google) and the nvidia forums but haven’t seen a similar error.

Here is the code snippet followed by the error.


template <int s>

extern global void dec_kernel(float *, float *);

template <int l, int blockSize>

extern global void min_err(float *);

template <int l, int s>

host void decode(float *g_odata, float *g_idata)


dim3 dimBlock(l, 1, 1);

dim3 dimGrid(l, 1, 1);

int smemSize = l * sizeof(float);

dec_kernel<4><<< dimGrid, dimBlock, smemSize >>>(g_idata, g_odata);

merr <4,4><<< dimGrid, dimBlock, smemSize >>>(g_odata);



NVCC output: In function `void decode(float*, float*)’: error: `_device_stub___globfunc__Z10dec_kernelILi4EEvPfS0’ undeclared (first use this function) error: (Each undeclared identifier is reported only once for each function it appears in.) error: `__device_stub___globfunc__Z7merrILi4ELi4EEvPf’ undeclared (first use this function)

Looks like the template instance of the function is being created but I still see a compilation error.

Has anyone seen this before? Can any one suggest ways to debug this or work around this?