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.