unresolved external symbol __ZdaPv __Znaj

I’m getting some errors trying to link my cuda project:

RayShaderImpl.cu.obj : error LNK2019: unresolved external symbol __ZdaPv referenced in function _intersectRayGPU

RayShaderImpl.cu.obj : error LNK2019: unresolved external symbol __Znaj referenced in function _intersectRayGPU

I’m using Visual Studio 2005, the 163.75 display drivers (nvidia.com from November 6, 2007) and the Cuda 1.1 Beta release.

I’ve been able to track the problem to the generated C source files (–keep argument to nvcc):

extern void *_Znaj(unsigned);

extern void _ZdaPv(void *);

whith use

ids = ((_ZN3mgi8ShaderIdE *)(_Znaj(numEntries)));

if ((int)(err = (cudaMemcpy(((void *)ids), ((const void *)idOut), (numEntries * 1U), cudaMemcpyDeviceToHost)))) {

fprintf(((__iob_func()) + 2), "failed to copy back ids\n");

abort();

}

else  {

}

_ZdaPv(((void *)ids));

free(((void *)ptr));

these functions look very much like variants of malloc and free. I tried to search for these in the files generated by nvcc and the cuda libs but I couldn’t find any references.

Has anyone else had this issue?

I think, you need 169.09 beta display drivers .

One thing that might cause this is using “new” and “delete” instead of “malloc” and “free”.