Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt5.8 static failes on windows 7 or lower, functioning on windows 10
Forum Updated to NodeBB v4.3 + New Features

Qt5.8 static failes on windows 7 or lower, functioning on windows 10

Scheduled Pinned Locked Moved Solved Installation and Deployment
12 Posts 3 Posters 2.9k 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.
  • J Offline
    J Offline
    JoVR
    wrote on last edited by
    #1

    As the title suggests, I've got an application that functions perfectly on several windows 10 versions on the moment.
    But when it is used on a windows 7, or even a windows vista, it doesn't function properly.

    Was build using Desktop Qt 5.8 Static MinGw 32bit.
    Currently runs on: 3 windows 10 desktops some 32bit, some 64bit. With absolutly no hassle.
    But on a Windows 7 32bit or a Windows vista 64bit it has some issues.

    Any thoughts are appreciated

    jsulmJ 1 Reply Last reply
    0
    • J JoVR

      As the title suggests, I've got an application that functions perfectly on several windows 10 versions on the moment.
      But when it is used on a windows 7, or even a windows vista, it doesn't function properly.

      Was build using Desktop Qt 5.8 Static MinGw 32bit.
      Currently runs on: 3 windows 10 desktops some 32bit, some 64bit. With absolutly no hassle.
      But on a Windows 7 32bit or a Windows vista 64bit it has some issues.

      Any thoughts are appreciated

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

      @JoVR "it has some issues" - what are these issues? Does the app start? Does it crash? ...?

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

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JoVR
        wrote on last edited by
        #3

        It does start.

        A main function of the application is that it opens a DLL and runs through some predefined functions.
        The DLL is also of my own design so I know its workings etc.

        On the Windows 10 it just calls open it with the QLibrary without any problems.
        But on the Windows 7 I get the message that the module in "*/App/DLL's/lib.DLL" (abstraction) is not found/could not be opened.

        The DLL is there, in the right place.

        BTW I'm having the same problem on Android, where some version can open it and others can't.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JoVR
          wrote on last edited by
          #4

          @jsulm Sorry for being so cryptic. I'm still running some tests to further pinpoint why it won't function but as of now the QLibrary seams to be the only problem.

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

            Hi, just guessing but that DLL of yours, is it dependent on some other DLL (perhaps a Microsoft DLL) that's not present in Windows 7?

            1 Reply Last reply
            0
            • J Offline
              J Offline
              JoVR
              wrote on last edited by
              #6

              Nope, definitely not. Except for:

              #include <stdexcept>
              #include <stdlib.h>
              #include <string>
              #include <iostream>
              #include <sstream>
              

              it only contains specific conversion functions for a machine we develop.
              So to simplify, it just counts.

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

                Ok, another question: have you tried a non-static (i.e. dynamic) Qt 5.8 build of you app, if it stops with the same error on Windows 7?

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  JoVR
                  wrote on last edited by
                  #8

                  @hskoglund

                  No not yet. I'll try that next.

                  1 Reply Last reply
                  0
                  • J Offline
                    J Offline
                    JoVR
                    wrote on last edited by
                    #9

                    @hskoglund
                    Tried it but gave me the same result. My application catches the error so it doesn't just stop or crash.
                    It just can't read any of the DLL's I point it to.

                    Also tried it as local admin as well to make sure it's not some hidden unauthorized action error.

                    QLibrary seems to be missing something. I don't have any clue where to look.

                    Any suggestions?

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

                      Well Dependency Walker is always a good tool to use, you could try loading your app first in Windows 10, hit F7 for a trace of a successful run, then perform the same incantation in Windows 7 and see where the trace (hopefully) differs.

                      Also, if your DLL does any graphics output, make sure it doesn't use DX12 or Direct3D12 (not supported in Windows 7).

                      J 1 Reply Last reply
                      1
                      • hskoglundH hskoglund

                        Well Dependency Walker is always a good tool to use, you could try loading your app first in Windows 10, hit F7 for a trace of a successful run, then perform the same incantation in Windows 7 and see where the trace (hopefully) differs.

                        Also, if your DLL does any graphics output, make sure it doesn't use DX12 or Direct3D12 (not supported in Windows 7).

                        J Offline
                        J Offline
                        JoVR
                        wrote on last edited by
                        #11

                        @hskoglund
                        Thanks for the tip.
                        With it I pinpointed the problem with the LIBWINPTHREAD-1.DLL
                        Which is not found in the windows 7 systems.

                        It is found on my development system in the QT installation.
                        Packing it with the application solves the problem. yippie

                        I'm presuming that to statically package it with my application will require me to rebuild Qt?

                        1 Reply Last reply
                        1
                        • hskoglundH Offline
                          hskoglundH Offline
                          hskoglund
                          wrote on last edited by
                          #12

                          Good to hear you found the culprit!
                          About rebuilding the static Qt to include that .dll, you shouldn't have to compile all of it again, just do the linking steps. But don't quote me on this, I haven't tried a static build myself yet :-)

                          P.S. I googled and found this StackOverflow post where someone mentions a stunt to make sure libwinpthread-1.dll is included in your static build; and that's to (dummy) use some functionality from it like <thread> in C++11 in your program.

                          1 Reply Last reply
                          1

                          • Login

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