Undefined symbols in x64 Debug build

I have a project which builds a Windows application for both Win32 and X64 platforms. There are found separate builds here: win32 debug, win32 release, x64 debug and x64 release. Everything except x64 debug is fine.

The x64 debug build throws out link errors for all of the extern “C” functions in the file CudaKernal.cu. These are the “glue” functions that call the CUDA kernal functions that execute on the device, so they have the function<<<dimGrid,dimBlock>>> code in them.

Example of one of the error messages:

CudaInterface.obj : error LNK2019: unresolved external symbol ConvertImageToGrayscale referenced in function “public: void __cdecl CudaInterface::GrayscaleImage(class CUDAAddr &)” (?GrayscaleImage@CudaInterface@@QEAAXAEAVCUDAAddr@@@Z)

This isn’t because of not declaring the functions as extern “C” - that has been done. Note the undecorated external symbol name that isn’t defined.

Whatever is going on, it is “right” in the x64 Release build and “wrong” in the Debug build. I have compared the vcxproj segments for these configurations and I’m still not seeing it.

If you have a release candidate (RC) version of CUDA 5.5, uninstall it and install the latest final release. The earlier RC versions had issues with some of the debug libraries.

I downloaded 5.5 about a week ago, so I don’t think that is the problem.

I think I am going to pass this on to the CUDA folks… it is a complete mystery to me.

Turns out deleting the .cu module and re-adding it to the project fixed the problem.

Something bad happened during the upgrade most likely.