Using Valgrind on Windows
-
wrote on 21 May 2012, 08:23 last edited by
Hello !
I try to use the valgrind tool on my Windows 7 so I install Ubuntu on a VM with VirtualBox.
The problem is I don't manage to connect QtCreator with my host.I installed open-ssh server on my Linux. I managed to connect Putty with my server but when I try with QtCreator, the message is :
Time limit exceeded while waiting for server response.I don't understand what's wrong !
-
wrote on 1 Jun 2012, 12:56 last edited by
hello
If you want to use Valgrind , you have to recompile your project under Linux, so you have to install in your linux at least Qt. If you install the SDK, you have QtCreator and you can compille in the same way as Windows.
When you have the program on linux you can run Valgrind
But you can have a problen on Windows and not on Linux.
Best regards
Frédéric -
wrote on 7 Mar 2013, 14:46 last edited by
Same problem with me, I'm using Qt creator 2.6.2.
I can't compile on linux because I'm using some win libraries. -
wrote on 8 Mar 2013, 02:18 last edited by
Valgrind is not available on Windows.
Check "this":http://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows
-
wrote on 8 Mar 2013, 09:23 last edited by
Caveat. Though I've used Valgrind a lot, I've never used it on Windows.
There is a port to Windows on Sourceforge.
http://sourceforge.net/projects/valgrind4win/
Not too sure how up to date it is, or how well it would work with Qt Creator.
A+
Paul -
wrote on 27 Jun 2013, 20:48 last edited by
Well, finally I ported my code to Linux, with little pain actually!
Now I can check memory leaks.Just used pre-processor definitions to skip the code for win:
@
#ifdef Q_OS_WIN
#include <windows.h>
#include <direct.h>bool Class::openComPort(const QString& port)
{
bool result=false;
///
/// windows code
///
return result;
}
#elsebool Class::openComPort(const QString& port)
{
return false;
}
#endif
@ -
wrote on 8 Jul 2013, 07:37 last edited by
Just to add another option:
(I have not tried it myself, but there is plenty of documentation out there about this method)
Instead of compiling under linux, compile "normal" for windows, but let it run under wine on linux. Which in turn runs under valgrind."see here":http://wiki.winehq.org/Wine_and_Valgrind