Question about ___cudaRegisterLinkedBinary referenced in function ____cudaRegisterAll

Hello,
I am working on Visual Studio 2008, using CUDA 5.0.
I am getting the following errors during linking:

Linking…
1>gqdtest_kernel.cu.obj : error LNK2019: unresolved external symbol ___cudaRegisterLinkedBinary_49_tmpxft_00001ed4_00000000_8_gqdtest_kernel_cpp1_ii_9571646c referenced in function “void __cdecl __sti____cudaRegisterAll_49_tmpxft_00001ed4_00000000_8_gqdtest_kernel_cpp1_ii_9571646c(void)” (?__sti____cudaRegisterAll_49_tmpxft_00001ed4_00000000_8_gqdtest_kernel_cpp1_ii_9571646c@@YAXXZ)
1>gqd_win.lib(common.cu.obj) : error LNK2019: unresolved external symbol ___cudaRegisterLinkedBinary_41_tmpxft_00001f38_00000000_8_common_cpp1_ii_4f760f83 referenced in function “void __cdecl __sti____cudaRegisterAll_41_tmpxft_00001f38_00000000_8_common_cpp1_ii_4f760f83(void)” (?__sti____cudaRegisterAll_41_tmpxft_00001f38_00000000_8_common_cpp1_ii_4f760f83@@YAXXZ)
1>gqd_win.lib(cuda_header.cu.obj) : error LNK2019: unresolved external symbol ___cudaRegisterLinkedBinary_46_tmpxft_00000e8c_00000000_8_cuda_header_cpp1_ii_e3ac5253 referenced in function “void __cdecl __sti____cudaRegisterAll_46_tmpxft_00000e8c_00000000_8_cuda_header_cpp1_ii_e3ac5253(void)” (?__sti____cudaRegisterAll_46_tmpxft_00000e8c_00000000_8_cuda_header_cpp1_ii_e3ac5253@@YAXXZ)

I have found ___cudaRegisterLinkedBinary in crt/host_runtime.h such as

crt/host_runtime.h:#define __REGISTERFUNCNAME_CORE(X) __cudaRegisterLinkedBinary##X
crt/host_runtime.h:#define ____cudaRegisterLinkedBinary(X) \

Could anyone help me to solve these errors?
Thank you

I get a similar __cudaRegisterLinkedBinary error when using CUDA 5.0 in VS2008. I haven’t found a satisfactory solution to the problem, but deleting the device-link.obj file prior to compilation or doing a clean build eliminates the error.

This is related: [url]device-link.obj / cudaRegisterLinkedBinary error - CUDA Programming and Performance - NVIDIA Developer Forums

I have encountered the problem

unresolved external symbol ___cudaRegisterLinkedBinary

when linking a CUDA static library created by myself, say func.lib, to a Visual Studio 2010 project.
I was initially adding the directory containing func.lib to

Project -> Properties -> Configuration Properties -> VC++ Directories -> Library Directories

and I received the error message above. I then added the directory containing func.lib to

Project -> Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories

and the problem has been solved. I hope this could help other users.

I have question how to solve very similar problem.
I’ve code in which I would like to call cuda kernel from other (known as dynamic parallelism).
From demo:

global void ChildKernel()
{

}
global void ParentKernel()
{
ChildKernel<<<16, 1>>>();
}

int main()
{

ParentKernel<<<256, 64>>>();

}

I setup (VS 2008 with cuda 5.5 project):

  • sm_35
  • -rdc=true
  • cudart.lib cudadevrt.lib
    but still have an error:
    kernel.cu.obj : error LNK2019: unresolved external symbol __cudaRegisterLinkedBinary_41_tmpxft_0002af98_00000000_8_kernel_cpp1_ii_f853efa9 referenced in function “void __cdecl __sti____cudaRegisterAll_41_tmpxft_0002af98_00000000_8_kernel_cpp1_ii_f853efa9(void)” (?__sti____cudaRegisterAll_41_tmpxft_0002af98_00000000_8_kernel_cpp1_ii_f853efa9@@YAXXZ)

Have someone idea what else should be configured ?


I see that this could be a problem with VS project templates which under VS2008 use MS Linker insted Cuda linker. Any solutions ?
I posted twice because portal gave me time-out error.