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. Cannot run Qt5 application on other Windows machines.
Forum Updated to NodeBB v4.3 + New Features

Cannot run Qt5 application on other Windows machines.

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 5 Posters 13.8k Views 1 Watching
  • 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.
  • E Offline
    E Offline
    eirikm
    wrote on last edited by
    #1

    Hi,

    I'm working on a Qt5 application using QML and the auto-generated QtQuick2ApplicationViewer. It works on my machine, I even figured out how which libraries I needed using DependencyWalker.

    On other Windows machines it's a different story. The application won't start. Starting it from command gives zero output. I tried putting in some qDebug statements to see if something was wrong with the plugin and QML paths, but there is absolutely nothing to see. Dependency Walker doesn't find any missing libraries.

    Any suggestions on how to proceed?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tucnak
      wrote on last edited by
      #2

      Hi, ~eirikm!

      Try to make a debug build and run it in debug mode on another Windows machine. It should help you. Now we have only information that DependencyWalker shows you that all dependencies are OK and that your app written in Qt 5 with QML technology.

      Just 4 me it's not enough. Have you ever tried to debug app on another win machine?

      1 Reply Last reply
      0
      • E Offline
        E Offline
        eirikm
        wrote on last edited by
        #3

        tucnak,

        Thanks for the reply. I usually build in debug so I didn't think about it. Not this time though since I get:
        @
        file:///path/to/my.qml: plugin cannot be loaded for module "QtQuick": The plugin 'C:/Qt5.0.0beta1/Desktop/Qt/5.0.0-beta1/msvc2010/imports/QtQuick.2/qtquick2plugin.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)
        import QtQuick 2.0
        @

        I'm running Qt5 beta1 for MSVC 2010. Looks like qtquick2plugin only exist for release :(

        1 Reply Last reply
        0
        • E Offline
          E Offline
          eirikm
          wrote on last edited by
          #4

          I got the debug build working using Beta2, released today. Found out that I was missing libGLESv2.dll and D3DCompiler_43.dll. Only got a dialog saying:

          "Debug Error!

          Program: C:\path\to\my.exe
          Module: 5.0.0
          File: kernel\qguiapplication.cpp
          Line: 722

          Failed to load platform plugin "windows". Available platforms are:"

          On the developer machine "windows" is listed, on the deployment machine the list is empty.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tucnak
            wrote on last edited by
            #5

            [quote author="eirikm" date="1352797462"]tucnak,

            Thanks for the reply. I usually build in debug so I didn't think about it. Not this time though since I get:
            @
            file:///path/to/my.qml: plugin cannot be loaded for module "QtQuick": The plugin 'C:/Qt5.0.0beta1/Desktop/Qt/5.0.0-beta1/msvc2010/imports/QtQuick.2/qtquick2plugin.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)
            import QtQuick 2.0
            @

            I'm running Qt5 beta1 for MSVC 2010. Looks like qtquick2plugin only exist for release :(
            [/quote]

            [quote author="eirikm" date="1352797462"]tucnak,
            Looks like qtquick2plugin only exist for release :(
            [/quote]

            It can't be truth. The error you got means that Qt can't mix debug and release libraries. Debug libraries has suffix -d, eg QtCored, QtGuid, etc. So you need to use only debug libraries to build it.

            1 Reply Last reply
            0
            • E Offline
              E Offline
              eirikm
              wrote on last edited by
              #6

              The debug error appeared in Qt Creator, and I have no clue how to fix it. I downloaded Beta 2 and the debug build worked. There might have been a problem with the compiler toolchain; it was auto-detected in the latest release while earlier I had to add it manually.

              I got it working by the way, with some help. Not trivial stuff, and the latest libraries I only found using DebugView.

              1 Reply Last reply
              0
              • W Offline
                W Offline
                wild34
                wrote on last edited by
                #7

                Have u solved your problem? I have the same problem: any app built with Qt5 doesn`t run on computer without Qt5 SDK installed. Program with all needed libraries cannot run wthout SDK installed, but it is too huge. Maybe somebody has static Qt5 libraries?

                1 Reply Last reply
                0
                • Z Offline
                  Z Offline
                  zibicoder
                  wrote on last edited by
                  #8

                  I had similar problem with qwindows.dll,
                  the solution I found is to copy plugin folder exactly to this same location as Qt was installed on building machine. In my case it is: C:\Qt\Qt5.0.1\5.0.1\msvc2010\plugins
                  Maybe it will help for you?

                  1 Reply Last reply
                  0
                  • W Offline
                    W Offline
                    wild34
                    wrote on last edited by
                    #9

                    Oh, yes! Thank you, it`s really working! :)))

                    1 Reply Last reply
                    0
                    • Z Offline
                      Z Offline
                      zibicoder
                      wrote on last edited by
                      #10

                      It's nice to hear it. I have played with my problem some more and I've found another thing. If you copy sub folder from plugins into direct location of yours *.exe it works too. I think it is better solution for us.
                      Nice codding!

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        MrNoway
                        wrote on last edited by
                        #11

                        [quote author="zibicoder" date="1360262874"]I had similar problem with qwindows.dll,
                        the solution I found is to copy plugin folder exactly to this same location as Qt was installed on building machine. In my case it is: C:\Qt\Qt5.0.1\5.0.1\msvc2010\plugins
                        Maybe it will help for you?[/quote]

                        This advice was good but didnt help me fully.

                        Here come's my story, it may help someone.

                        simple example
                        Machine 1 Created Hello World in QtCreator, debugged and it was running on Machine 2 seamless.

                        Machine 2 Created Hello World in my own compiled librabries VC2010 (Qt 4.8.3), debugged and it was running on machine 1 seamless.

                        (of course you must put all needed *.dll files in the same folder and msvcp100d/msvcr100d either in the same folder or windows\system32\

                        Here comes the Problem (Solved after hours)
                        Machine 2 Created Hello World from the already compiled libraries (Qt.5.1.1). If you try to run this on machine 1 I got this Error over and over again, although you put everything you need in the same folder.
                        http://s14.directupload.net/images/131023/nhtuesl3.jpg

                        Thanks to 'zibicoder' I put the folder "platforms" in the same folder where the .exe file is.

                        And it was working

                        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