I’m looking at simpleSeparateCompilation_vs2008.sln, which is part of the CUDA 5.0 samples package. The solution built successfully on the first try. I then made a slight modification (added whitespace) to simplieSeparateCompliation.cu and attempted to build the solution again. This resulted in a build error:
1>simpleSeparateCompilation.cu.obj : error LNK2019: unresolved external symbol ___cudaRegisterLinkedBinary_72_tmpxft_00001348_00000000_14_simpleSeparateCompilation_compute_35_cpp1_ii_e3db9f73 referenced in function “void __cdecl __sti____cudaRegisterAll_72_tmpxft_00001348_00000000_14_simpleSeparateCompilation_compute_35_cpp1_ii_e3db9f73(void)” (?__sti____cudaRegisterAll_72_tmpxft_00001348_00000000_14_simpleSeparateCompilation_compute_35_cpp1_ii_e3db9f73@@YAXXZ)
I’ve discovered two ways of getting around the error:
- Do a clean build / rebuild
- Delete simpleSeparateCompilation.device-link.obj prior to doing a build
Has anyone else encountered this problem? Any tips for avoiding the error?
Thanks.