Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Using Valgrind on Windows

Using Valgrind on Windows

Scheduled Pinned Locked Moved Qt Creator and other tools
7 Posts 6 Posters 24.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Octani
    wrote on 21 May 2012, 08:23 last edited by
    #1

    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 !

    1 Reply Last reply
    0
    • D Offline
      D Offline
      derf_r
      wrote on 1 Jun 2012, 12:56 last edited by
      #2

      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

      1 Reply Last reply
      0
      • U Offline
        U Offline
        ulesQt
        wrote on 7 Mar 2013, 14:46 last edited by
        #3

        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.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          TioRoy
          wrote on 8 Mar 2013, 02:18 last edited by
          #4

          Valgrind is not available on Windows.

          Check "this":http://stackoverflow.com/questions/413477/is-there-a-good-valgrind-substitute-for-windows

          1 Reply Last reply
          0
          • P Offline
            P Offline
            paulf
            wrote on 8 Mar 2013, 09:23 last edited by
            #5

            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

            1 Reply Last reply
            0
            • U Offline
              U Offline
              ulesQt
              wrote on 27 Jun 2013, 20:48 last edited by
              #6

              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;
              }
              #else

              bool Class::openComPort(const QString& port)
              {
              return false;
              }
              #endif
              @

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on 8 Jul 2013, 07:37 last edited by
                #7

                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

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved