visual-studiodllcudalinker

CUDA: Getting linking error only in device emulation mode


I am compiling a dll which goes just fine unless I use the -deviceemu mode.

In this case I get several of the following linking errors:

CUDAKernel_ColourHist.obj : error LNK2019: unresolved external symbol ___cudaMutexOperation@4 referenced in function ___uAtomicAdd 1>CUDAKernel_1.obj : error LNK2001: unresolved external symbol ___cudaMutexOperation@4 1>CUDAKernel_2.obj : error LNK2001: unresolved external symbol ___cudaMutexOperation@4

Which led me to believe perhaps I wasn't linking the correct files, but I believe I am. I am using Visual Studio and any help woud be appreciated.


Solution

  • Fixed, I was using an older version of the libraries, linking with the newer libraries fixed the problem.