Help: Linker Error error LNK2019: unresolved external symbo

error LNK2019: unresolved external symbol __ZdlPv referenced in function _main
error LNK2019: unresolved external symbol __Znaj referenced in function _main

Build Step Command Line:
“$(CUDA_BIN_PATH)\nvcc.exe” -ccbin “$(VCInstallDir)bin” -c -D_DEBUG -DWIN32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc,/W3,/nologo,/Wp64,/Od,/Zi,/RTC1,/MTd -I"$(CUDA_INC_PATH)" -I./ -I…/…/common/inc -o $(ConfigurationName)\Sobel.obj Sobel.cu

C++ Additional Includes:
“$(CUDA_INC_PATH)”;…/…/common/inc

Linker Additional Libs:
“$(CUDA_LIB_PATH)”;…/…/common/lib

Linker Input:
cudart.lib cutil32D.lib

Can anyone point me into a direction to solve this problem, I have searched google, these forums, extensively.

The closest thing I found was:

[url=“http://forums.nvidia.com/index.php?showtopic=52639”]The Official NVIDIA Forums | NVIDIA

(The solution was to update the drivers to 169.09)

I have Version: 169.21

did you find a solution for this? I’m getting similar errors with my opengl code.

1>helloworld.gen.obj : error LNK2019: unresolved external symbol __ZdaPv referenced in function __Z9onDisplayv

1>helloworld.gen.obj : error LNK2019: unresolved external symbol __Znaj referenced in function __Z9onDisplayv

which function do you used in the main()?

  1. If you use CUDA 1.1, update it to 2.0

  2. Replace the new and delete with malloc and free

I am new to programming in CUDA and I am trying to use cublasSgemm in a .cu file and I get the same linking error. Any suggestions on how to use cublas functions within a .cu file or vice versa?

You should add the lib which content the _ZdaPv & _Znaj function.

Or, you define the two functions by yourself.

I was getting the same errors and once i replaced the [new] and [delete] with malloc and free it worked (yeah and I use the updated driver). It makes sense since the code is being declared in an extern “C” environment whereby new and delete won’t be supported. Hope I am right on this.

replacing new and delete with malloc and free worked for me. i had the same error message. i also used extern “C” because i could not get my project to compile correctly in emulation mode without it. i wrapped my code in extern “C” and forgot to change over the new & delete.

I’m trying to write a simple code for getting some information from my GPU (NVidia Geforce 760 GTX) such as temperature using NVAPI.
I started with CUDA sample codes. Maybe you see these sample codes provided by NVidia. I copied one of the sample codes (‘CUDA Samples\v6.5\0_Simple\vectorAdd’) to write in this sample. I copied all of ‘.h’ files of NVAPI to ‘CUDA Samples\v6.5\common\inc’ and copied ‘nvapi.lib’ to ‘CUDA Samples\v6.5\common\lib\Win32’ and copied ‘nvapi64.lib’ to ‘CUDA Samples\v6.5\common\lib\x64’.
I preformed these copies to ‘C:\Program Files\CUDA\v6.5\include’ and ‘C:\Program Files\CUDA\v6.5\lib’.

But when I build my code I received these errors:

Error 28 error LNK2019: unresolved external symbol NvAPI_GPU_GetThermalSettings referenced in function...
Error 29 error LNK2019: unresolved external symbol NvAPI_GPU_GetFullName referenced in function...
and some similar errors.