I've written a couple of applications in QML (part of Qt 5). In a question that I've made before (https://softwareengineering.stackexchange.com/questions/213698/deploying-qt-based-app-on-mac-os-x), I found the solution for deploying my app on OS X (using the macdeployqt tool).
Deploying Qt4 apps on Windows was easy:
- You compiled it in release mode.
- You copied the necessary libraries (DLLs).
- You tested and it worked.
Unfortunately, this approach did not work in Qt5 (I even included the platforms folder with the qwindows.dll file and it did not work). After some days of trying, I gave up and compiled a static version of Qt5.
Again, it did not work. The app works on a PC with Qt installed, but it crashes on "clean" PCs. As a side note, Windows 8/8.1 systems don't give a warning or a message notifying me about the app's crash. But in Windows 7 a message notifies me that the application crashed.
I've tried running Dependency Walker (depends.exe) and all libraries in the static build of my application seemed fine.
In Windows 8, I don't get any error. But after profiling the app in depends.exe, I get an access violation originating from QtGui.dll. The exact error is
Second chance exception 0xC0000005 (Access Violation) occurred in "QT5GUI.DLL" at address 0x61C2C000.
Is there something that I am missing (say an extra DLL or config file)?
Application information:
- Written and compiled with Qt 5.2.1
- Uses Quick/QML.
- Uses the network module.
- Uses the webkit module.
- Uses the bluetooth module.
- The QML files are written in Quick 2.2
question from:
https://stackoverflow.com/questions/22185974/deploying-qt-5-app-on-windows 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…