How to Get Crtdbg.H File

cannot open source file crtdbg.h (dependency of iostream) C/C++(1696)

2022 UPDATE:

answer by @Prabhat Bhargav worked for me, but I had to change path to C:/MinGW/bin/g++.exe instead of C:/MinGW64/bin/g++.exe

Guess they changed default folder name by removing 64 (at least on windows 10).

After that it worked properly. Also if you changed the default installation folder when installing MinGW compiler, you will have to select that as your compiler path.

Problem when trying to find memory leaks by using crtdbg.h

Ok, It was impossible to answer my question with the information I gave(I am sorry). The problem was that I had a Base class and derived classes. And in the base class I did not have a virtual destructor. Adding virtual destructor fixed my problem and removed all memory leaks.

GCC memory leak detection equivalent to Microsoft crtdbg.h?

You should have a look at "Cross-Platform Memory Leak Detector", looks very similar to the crtdbg.h technique.



Related Topics



Leave a reply



Submit