error LNK2001: unresolved external symbol "__declspec(dllimport) class VisualLeakDetector g_vld" (__imp_?g_vld@@3VVisualLeakDetector@@A)

May 24, 2012 at 6:51 PM

I am using VC++ at Visual Studio 2008, and installed Visual Leak Detector 1.9h (Beta) version. I did the requirements at Go to Tools -> Options -> Projects and Solutions -> VC++ Directories on Visual Studio. Also I include the "vld.h".

However, when I build the solution, I get the errors:

Error 1 error LNK2001: unresolved external symbol "__declspec(dllimport) class VisualLeakDetector g_vld" (__imp_?g_vld@@3VVisualLeakDetector@@A

Error 2 fatal error LNK1120: 1 unresolved externals

What should I further do to use Visual Leak Detector? Thanks.

 

 

May 24, 2012 at 7:01 PM

Sorry. I changed to the version of "v2.2.3". But I got the error like : "The program can't start because vld_x86.dll is missing from your computer. Try reinstalling the program to fix this problem." I checked the vld_x86.dll, and it exists in the "C:\Program Files (x86)\Visual Leak Detector\bin\Win32". Any ideas about it? Thanks.

Coordinator
May 24, 2012 at 11:45 PM

I don't know why program cannot find dll. You can try copy all 32bit VLD dll's to your program folder as workaround.

Sep 11, 2014 at 7:45 AM
Edited Sep 11, 2014 at 7:48 AM
Hello,
I tried to use VLD with VS2010 and got the same error on existing project:
error LNK2001: unresolved external symbol "__declspec(dllimport) class VisualLeakDetector g_vld" (__imp_?g_vld@@3VVisualLeakDetector@@A)
.\Debug\Controller.exe : fatal error LNK1120: 1 unresolved externals
I have checked the path, performed the additional copying of dll`s to apps Debug and Windows folders, but the project could not be linked.

Any ideas ?