Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved Compatibility of programs developed with qt4

    General and Desktop
    3
    15
    136
    Loading More Posts
    • 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
      mret63 last edited by mret63

      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 Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by mrjj

        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 Reply Quote 2
        • M
          mret63 last edited by mret63

          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

          mrjj 1 Reply Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion @mret63 last edited by mrjj

            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 Reply Quote 1
            • M
              mret63 @mrjj last edited by mret63

              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 Reply Quote 0
              • mrjj
                mrjj Lifetime Qt Champion last edited by

                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 Reply Quote 1
                • M
                  mret63 last edited by

                  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

                  mrjj 1 Reply Last reply Reply Quote 1
                  • mrjj
                    mrjj Lifetime Qt Champion @mret63 last edited by mrjj

                    @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 Reply Quote 2
                    • mrjj
                      mrjj Lifetime Qt Champion last edited by mrjj

                      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 Reply Quote 2
                      • M
                        mret63 last edited by

                        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

                        mrjj 1 Reply Last reply Reply Quote 0
                        • mrjj
                          mrjj Lifetime Qt Champion @mret63 last edited by

                          @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 Reply Quote 1
                          • M
                            mret63 @mrjj last edited by

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

                            mrjj 1 Reply Last reply Reply Quote 0
                            • mrjj
                              mrjj Lifetime Qt Champion @mret63 last edited by

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

                              1 Reply Last reply Reply Quote 1
                              • M
                                mret63 last edited by mret63

                                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. Rogina 1 Reply Last reply Reply Quote 1
                                • Pablo J. Rogina
                                  Pablo J. Rogina @mret63 last edited by

                                  @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 Reply Quote 2
                                  • First post
                                    Last post