Skip to main content
1-Visitor
Nov 8, 2017 11:01 AM UTC
Question

Debug Leak Memory in Visual Studio

Hi,

I'm trying to search memory leak into the code of the dll that the compay inside wich one i'm working has developed for Creo 2.0.

Indeed the dll crash randomly and we strongly suspect a problem with the memory.

This dll is actually developed in Visual Studio 2010 using the C language 

The fact is that i'm trying to use the <crtdbg.h> librairy to use the methode _CrtDumpMemoryLeaks() to discover some memory leaks , but the Visual Studio project get me an error :  " error LNK2019 lnk2019 unresolved external symbol in _free_dbg".

This error happen when i try to "#include <crtdbg.h>"

I already tried to include this librairy in an empty project and it worked perfectly .

 

Have had anybody experience with this topic?

 

Aymeric

1 reply

1-Visitor
Nov 11, 2017 12:18 PM UTC

To use it you have to link with either LIBCD.LIB, LIBCMTD.LIB or MSVCRTD.LIB

Please see MSDN _free_dbg

 

Translate