Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT Installation problem
QtWS25 Last Chance

QT Installation problem

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 1.3k 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.
  • M Offline
    M Offline
    mgreenish
    wrote on last edited by mgreenish
    #1

    I have been developing an application on Mac and Windows for some time. I have been developing updates on Mac for the past few months. I compiled the application on my Win7 installation (virtual machine running through Parallels) and got the following error:

    C:\Qt\Tools\mingw530_32\i686-w64-mingw32\include\iphlpapi.h:38: error: 'PMIB_TCPTABLE2' was not declared in this scope
       ULONG WINAPI GetTcpTable2 (PMIB_TCPTABLE2 TcpTable, PULONG SizePointer, WINBOOL Order);
                                  ^
    

    This is a MinGW source file which I haven't touched. I figured my installation got corrupted so I uninstalled QT entirely and re-installed it. However, I still get the same error.

    PMIB_TCPTABLE2 is declared in include\tcpmib.h inside the the precompiled define

    #if (_WIN32_WINNT >= 0x0600)
    ...PMIB_TCPTABLE2 definition...
    #endif
    

    I put poor syntax inside the #if and no error was generated so it seems that _WIN32_WINNT is < 0x0600. My target is Desktop PC, I want Win7 & Win10 support.

    Any ideas on what could be wrong in my set up? I did upgrade parallels recently but not the windows image, which I have used in the past for this purpose.

    jsulmJ 1 Reply Last reply
    0
    • M mgreenish

      I have been developing an application on Mac and Windows for some time. I have been developing updates on Mac for the past few months. I compiled the application on my Win7 installation (virtual machine running through Parallels) and got the following error:

      C:\Qt\Tools\mingw530_32\i686-w64-mingw32\include\iphlpapi.h:38: error: 'PMIB_TCPTABLE2' was not declared in this scope
         ULONG WINAPI GetTcpTable2 (PMIB_TCPTABLE2 TcpTable, PULONG SizePointer, WINBOOL Order);
                                    ^
      

      This is a MinGW source file which I haven't touched. I figured my installation got corrupted so I uninstalled QT entirely and re-installed it. However, I still get the same error.

      PMIB_TCPTABLE2 is declared in include\tcpmib.h inside the the precompiled define

      #if (_WIN32_WINNT >= 0x0600)
      ...PMIB_TCPTABLE2 definition...
      #endif
      

      I put poor syntax inside the #if and no error was generated so it seems that _WIN32_WINNT is < 0x0600. My target is Desktop PC, I want Win7 & Win10 support.

      Any ideas on what could be wrong in my set up? I did upgrade parallels recently but not the windows image, which I have used in the past for this purpose.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @mgreenish What exact Qt version do you use?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      0
      • hskoglundH Offline
        hskoglundH Offline
        hskoglund
        wrote on last edited by
        #3

        Hi, MinGW sets _WIN32_WINNT to 0x0502 (Windows 2003 Server and later) in it's header file _mingw.h. (Means a hello world.c compiled with MinGW should be able to run on Windows 2003 Server and later.)

        PMIB_TCPTABLE2 perhaps does not work on Windows Server 2003, could be the reason for #if (_WIN32_WINNT >= 0x0600) i.e. requires Vista or later.

        Try #define _WIN32_WINNT 0x0600 at the top of your program, then MinGW will not change it.

        1 Reply Last reply
        0
        • jsulmJ jsulm

          @mgreenish What exact Qt version do you use?

          M Offline
          M Offline
          mgreenish
          wrote on last edited by
          #4

          @jsulm QT Creator Community 4.11.1 & MinGW 5.3

          jsulmJ 1 Reply Last reply
          0
          • M Offline
            M Offline
            mgreenish
            wrote on last edited by mgreenish
            #5

            @hskoglund said in QT Installation problem:

            _WIN32_WINNT 0x0600

            Good idea. I set the following at the top of my main:

            #ifdef Q_OS_WIN
            #define _WIN32_WINNT 0x0600
            #endif
            

            But that didn't work. But I found the definition for _WIN32_WINNT in include_mingw.h and changed it from 0x502 to 0x600 and that worked.

            Just odd that I have never run into that in the past...

            Thanks for clarifying what the default means !!

            1 Reply Last reply
            0
            • M mgreenish

              @jsulm QT Creator Community 4.11.1 & MinGW 5.3

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @mgreenish said in QT Installation problem:

              QT Creator Community 4.11.1

              Just as note: this is QtCreator version not Qt. They are not the same.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              M 1 Reply Last reply
              0
              • jsulmJ jsulm

                @mgreenish said in QT Installation problem:

                QT Creator Community 4.11.1

                Just as note: this is QtCreator version not Qt. They are not the same.

                M Offline
                M Offline
                mgreenish
                wrote on last edited by
                #7

                @jsulm Right, sorry, 5.9.9. Before I uninstalled it, I had 5.8.0.

                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