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. Compatibility of programs developed with qt4
QtWS25 Last Chance

Compatibility of programs developed with qt4

Scheduled Pinned Locked Moved Solved General and Desktop
15 Posts 3 Posters 499 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
    mret63
    wrote on 27 Jul 2020, 17:11 last edited by mret63 8 Jun 2020, 13:01
    #1

    Updating with a TL;DR now that the issue is solved:

    I attempted to use a program modded from another program originally deployed in qt4, and patched and redeployed in qt5.8. The deployment was "released" without an installer as a folder containing exes and dlls from qt4. Several colleagues of mine has used the program with no issues, however, I was unable to run it on my Win10 x64 system running Qt 5.15 due to missing dependencies. User mrjj created a new deployment for 5.9 2015 x64, and I was able to run the program perfectly after installing Qt 5.9.9 MSVC 2015 x64.

    Hello all,

    Not exactly a development question, though I may be involved in development of this program at a later stage. I'm new to Qt so excuse my ignorance especially if this is the wrong sub-forum.

    I'm trying to use a program on my Windows 10 machine that was developed a few years ago for research purposes, that appears to have been developed in qt4 (based on the DLLs in the target folder).

    The program doesn't come with an installer but is packaged with all the necessary dependencies (in theory) in the target folder, and I know at least three researchers (besides the developer) that have successfully run it as-is in the past year or two.

    However, when I try to run the program, I am missing a DLL from Qt 5. Using dependency walker, I have tried to resolve dependencies, including copying over the relevant DLLs and plugins and reinstalling C and C++ runtimes. Invariably when I patch one error another dependency error crops up. Trying to resolve the huge number of listed issues in dependency walker is beyond my abilities and I'm fairly sure the solution should be much simpler. Poring over stack overflow and other general forums hasn't yielded a solution and this seems to be a rare issue.

    I suspect that my installing the most recent version of Qt is the problem. However, this doesn't make sense to me - surely having an updated version of Qt on my machine shouldn't screw up dependencies for programs written in an older version.

    The developer of this program modded a program that had an installer and that I have no issue running, and apparently had limited resources. While I'm sure that this is the origin of the problem I'm not sure there's much I can do about it. I'd be very grateful for any insight on how I can solve the issue.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 27 Jul 2020, 17:46 last edited by mrjj
      #2

      Hi and welcome to the forums.
      Using Qt5 DLLS with a Qt4 compiled program will not work.

      However, do you know what Qt version ?
      https://download.qt.io/archive/qt/4.8/
      I would try to get my hands on the version used and then copy from a Qt4 install.

      However, if it used to run, then it should still run.

      Did they run it on win 7 or what changed since it was last working ?

      1 Reply Last reply
      2
      • M Offline
        M Offline
        mret63
        wrote on 29 Jul 2020, 13:39 last edited by mret63
        #3

        Hi, thanks for the reply and the warm welcome :)

        As for the version of windows, at least one person has run the program on windows 10 without problems.

        The original program was developed well after the release of qt5 but comes with qt4 DLLs in the folder itself. My colleagues are able to run it as is, which makes it seem as if it was developed in qt4.

        The strange thing is that when I run it as-is (before I have tried fixing dependencies) I get the error "The code execution cannot proceed because qt5widgets.dll was not found. Reinstalling the program may fix this problem". When I fix one dependency , another Qt5 dll ends up being missing, and then eventually I find I'm missing plugins and C/C++ runtime dlls.

        I've tried using dependency walker to fix missing DLLs en masse. Then I copied over plugins. Eventually I can load the program but none if its functionalities work and I get new errors. But that is incredibly time consuming and can't be the right approach IMO.

        I don't believe copying over qt4 DLLs would help since I already have them and that's not what is creating the error.

        Could wiping qt5 and installing qt4 instead change anything?

        This is what I get from dependency walker:
        screenshot of dependency walker

        Thanks

        M 1 Reply Last reply 29 Jul 2020, 13:51
        0
        • M mret63
          29 Jul 2020, 13:39

          Hi, thanks for the reply and the warm welcome :)

          As for the version of windows, at least one person has run the program on windows 10 without problems.

          The original program was developed well after the release of qt5 but comes with qt4 DLLs in the folder itself. My colleagues are able to run it as is, which makes it seem as if it was developed in qt4.

          The strange thing is that when I run it as-is (before I have tried fixing dependencies) I get the error "The code execution cannot proceed because qt5widgets.dll was not found. Reinstalling the program may fix this problem". When I fix one dependency , another Qt5 dll ends up being missing, and then eventually I find I'm missing plugins and C/C++ runtime dlls.

          I've tried using dependency walker to fix missing DLLs en masse. Then I copied over plugins. Eventually I can load the program but none if its functionalities work and I get new errors. But that is incredibly time consuming and can't be the right approach IMO.

          I don't believe copying over qt4 DLLs would help since I already have them and that's not what is creating the error.

          Could wiping qt5 and installing qt4 instead change anything?

          This is what I get from dependency walker:
          screenshot of dependency walker

          Thanks

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 29 Jul 2020, 13:51 last edited by mrjj
          #4

          Hi
          If really is compiled with qt4 it should not ask after Qt5 dlls.
          Also say it really uses Qt5.5 and you try to give it DLLS from Qt5.14 or similar it will most likely
          explode.
          So the real version is important as no mixing will work.

          The original program was developed well after the release of qt5 but comes with qt4 DLLs in the folder itself. My colleagues are able to run it as is, which makes it seem as if it was developed in qt4.

          Does your college have Qt installed ?

          It must get the Qt dll from somewhere but could go to colleagues pc and make copy of the folder
          then delete all dlls and see if it starts.

          If it works for them, it should also work for you so something is up.

          Oh, do you have the source code still ?

          M 1 Reply Last reply 29 Jul 2020, 14:14
          1
          • M mrjj
            29 Jul 2020, 13:51

            Hi
            If really is compiled with qt4 it should not ask after Qt5 dlls.
            Also say it really uses Qt5.5 and you try to give it DLLS from Qt5.14 or similar it will most likely
            explode.
            So the real version is important as no mixing will work.

            The original program was developed well after the release of qt5 but comes with qt4 DLLs in the folder itself. My colleagues are able to run it as is, which makes it seem as if it was developed in qt4.

            Does your college have Qt installed ?

            It must get the Qt dll from somewhere but could go to colleagues pc and make copy of the folder
            then delete all dlls and see if it starts.

            If it works for them, it should also work for you so something is up.

            Oh, do you have the source code still ?

            M Offline
            M Offline
            mret63
            wrote on 29 Jul 2020, 14:14 last edited by mret63
            #5

            Hi,

            Does your college have Qt installed ?

            My colleagues are using it on their laptops, I'm waiting to hear which version of qt - seems likely this is part of the problem.

            It must get the Qt dll from somewhere but could go to colleagues pc and make copy of the folder
            then delete all dlls and see if it starts.

            If it works for them, it should also work for you so something is up.

            I tried deleting them, it doesn't make a difference for better or for worse. So possibly the old DLLs are just a holdover from the original unmodded program (I have it and it comes with an installer and the same DLLs)

            Oh, do you have the source code still ?

            In theory this should be it but it's unclear whether this is exactly what I have (I'm running busmezzo but the exe has the same name and busmezzo is the name of a branch in the source code):
            https://github.com/OdedCats/mezzo

            Thanks a bunch!

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 29 Jul 2020, 15:15 last edited by
              #6

              Hi
              It does look like its started made with Qt4.
              However, besides a few files that are named Qt4 in the end,
              there was not much that indicated the GUI was qt4, oddly enough.
              It wanted Visual 2012 which i dont have so could not run it.

              Is there anywhere i can download the installer you are using ?

              1 Reply Last reply
              1
              • M Offline
                M Offline
                mret63
                wrote on 29 Jul 2020, 18:54 last edited by
                #7

                Is there anywhere i can download the installer you are using ?

                Hi, it's somewhat complicated.
                The original program is called Mezzo, it comes with an installer, I have it installed and it runs with no problems: https://static.sys.kth.se/abe/ctr/mezzo_setup.zip
                The modified program is called BusMezzo, it runs on an exe and other files with the same names as the original but there is no installer, users simply download a folder and run it from the folder: https://www.dropbox.com/sh/0z7uf6xu71t4n38/AACPRLBNFD4xsgO9GKacZaW1a?dl=0&lst=
                The lack of an installer isn't an issue for other people but seems to be the cause of my problems.

                It does look like its started made with Qt4.
                However, besides a few files that are named Qt4 in the end,
                there was not much that indicated the GUI was qt4, oddly enough.
                It wanted Visual 2012 which i dont have so could not run it.

                I just remembered that in the development blog - http://mezzo_dev.blogspot.com/ - they don't say it directly but it seems it was originally developed in qt 4 and the last changes were made in 5.8.

                Also, one of my colleagues ran it with qt 5.9

                M 1 Reply Last reply 29 Jul 2020, 19:06
                1
                • M mret63
                  29 Jul 2020, 18:54

                  Is there anywhere i can download the installer you are using ?

                  Hi, it's somewhat complicated.
                  The original program is called Mezzo, it comes with an installer, I have it installed and it runs with no problems: https://static.sys.kth.se/abe/ctr/mezzo_setup.zip
                  The modified program is called BusMezzo, it runs on an exe and other files with the same names as the original but there is no installer, users simply download a folder and run it from the folder: https://www.dropbox.com/sh/0z7uf6xu71t4n38/AACPRLBNFD4xsgO9GKacZaW1a?dl=0&lst=
                  The lack of an installer isn't an issue for other people but seems to be the cause of my problems.

                  It does look like its started made with Qt4.
                  However, besides a few files that are named Qt4 in the end,
                  there was not much that indicated the GUI was qt4, oddly enough.
                  It wanted Visual 2012 which i dont have so could not run it.

                  I just remembered that in the development blog - http://mezzo_dev.blogspot.com/ - they don't say it directly but it seems it was originally developed in qt 4 and the last changes were made in 5.8.

                  Also, one of my colleagues ran it with qt 5.9

                  M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 29 Jul 2020, 19:06 last edited by mrjj
                  #8

                  @mret63
                  Hi
                  Super. I will try it.
                  i just start with mezzo_gui.exe ?

                  update.
                  That link http://mezzo_dev.blogspot.com/ was really helpful.
                  this apps need the Qt5.8 VS 2015 64 Qt install.
                  5.9 might work also as it seems your colleague was lucky.

                  update 2:
                  Looking good
                  alt text

                  1 Reply Last reply
                  2
                  • M Offline
                    M Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on 29 Jul 2020, 19:51 last edited by mrjj
                    #9

                    Hi
                    Update 3.
                    I installed 5.9 vs2015 64 bit and made a new deployment folder using the windeployqt tool.

                    Also runs on win 10 now even i have other Qt versions installed.
                    ( not 5.9 as i did this in virtual machine to be clean)
                    Seems to work so i hope it does for you too.

                    the new folder as zip file. unzip and run exe.
                    https://we.tl/t-u5iMgCtBlF
                    And please be paranoid and scan it first as
                    downloading random .exe and dlls from a forum
                    is always slightly dubious.

                    1 Reply Last reply
                    2
                    • M Offline
                      M Offline
                      mret63
                      wrote on 2 Aug 2020, 13:56 last edited by
                      #10

                      Wow! Sorry for the late reply - for some reason I didn't get a notification. Will try and get back to you, thanks in advance

                      M 1 Reply Last reply 2 Aug 2020, 13:58
                      0
                      • M mret63
                        2 Aug 2020, 13:56

                        Wow! Sorry for the late reply - for some reason I didn't get a notification. Will try and get back to you, thanks in advance

                        M Offline
                        M Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on 2 Aug 2020, 13:58 last edited by
                        #11

                        @mret63
                        Hi
                        I tried it on a 100% clean windows 10 and it ran.
                        At least show the main window etc. Then i didn't know what to press to see if it really works :)

                        Hope it also works for you as then you can use it as new "installer"

                        M 1 Reply Last reply 2 Aug 2020, 14:16
                        1
                        • M mrjj
                          2 Aug 2020, 13:58

                          @mret63
                          Hi
                          I tried it on a 100% clean windows 10 and it ran.
                          At least show the main window etc. Then i didn't know what to press to see if it really works :)

                          Hope it also works for you as then you can use it as new "installer"

                          M Offline
                          M Offline
                          mret63
                          wrote on 2 Aug 2020, 14:16 last edited by
                          #12

                          @mrjj Surprisingly, it ran with 5.15! I couldn't open files so currently installing 5.9 and checking again

                          M 1 Reply Last reply 2 Aug 2020, 20:55
                          0
                          • M mret63
                            2 Aug 2020, 14:16

                            @mrjj Surprisingly, it ran with 5.15! I couldn't open files so currently installing 5.9 and checking again

                            M Offline
                            M Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on 2 Aug 2020, 20:55 last edited by
                            #13

                            @mret63
                            ok :)
                            Worked fine for me with 5.9
                            would be fine with 5.15

                            1 Reply Last reply
                            1
                            • M Offline
                              M Offline
                              mret63
                              wrote on 4 Aug 2020, 13:20 last edited by mret63 8 Apr 2020, 13:26
                              #14

                              Eureka!!! It works perfectly now that I installed 5.9.9 MSVC 2015 x64 :) Amazing!

                              So the issue was a matter of version compatibility, and my colleagues were just lucky to be working with older systems?

                              So so grateful for your help!!! Thanks to you I can finally continue my research.

                              Pablo J. RoginaP 1 Reply Last reply 4 Aug 2020, 15:24
                              1
                              • M mret63
                                4 Aug 2020, 13:20

                                Eureka!!! It works perfectly now that I installed 5.9.9 MSVC 2015 x64 :) Amazing!

                                So the issue was a matter of version compatibility, and my colleagues were just lucky to be working with older systems?

                                So so grateful for your help!!! Thanks to you I can finally continue my research.

                                Pablo J. RoginaP Offline
                                Pablo J. RoginaP Offline
                                Pablo J. Rogina
                                wrote on 4 Aug 2020, 15:24 last edited by
                                #15

                                @mret63 said in Compatibility of programs developed with qt4:

                                It works perfectly now

                                great. Please don't forget to mark your post as solved!

                                Upvote the answer(s) that helped you solve the issue
                                Use "Topic Tools" button to mark your post as Solved
                                Add screenshots via postimage.org
                                Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                                1 Reply Last reply
                                2

                                1/15

                                27 Jul 2020, 17:11

                                • Login

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