Cannot run Qt5 application on other Windows machines.
-
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?
-
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?
-
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 :(
-
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: 722Failed to load platform plugin "windows". Available platforms are:"
On the developer machine "windows" is listed, on the deployment machine the list is empty.
-
[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.
-
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.
-
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?
-
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? -
Oh, yes! Thank you, it`s really working! :)))
-
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! -
[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.jpgThanks to 'zibicoder' I put the folder "platforms" in the same folder where the .exe file is.
And it was working