Application deployed with QT5 libraries does not start on Windows 7

前端 未结 8 1454
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-05 04:37

Recently we have been migrating our QT based application on Windows from QT 4.8 to QT 5, and we have run into a issue with deployment. Note that our app has not changed, we

相关标签:
8条回答
  • 2020-12-05 04:53

    Qt platform dlls are located in the "plugins" folder in "qtbase": C:\Qt\5.0.0\qtbase\plugins\platforms

    0 讨论(0)
  • 2020-12-05 04:54

    Yes, well spotted. I was having the same deployment problems using qt 5.0.2.

    Likewise installed platforms folder with these two dlls in the apps folder, and the deployments on vista and win7 now work.

    Dependency walker does not help here as it does not notify qwindows.dll or qminimal.dll as required dlls.

    The platforms dlls in my Qt installation are at \Qt\5.0.2\mingw47_32\plugins\platforms.

    0 讨论(0)
  • 2020-12-05 04:57

    I used an instance of QMediaPlayer and QMediaPlaylist and my application would no longer start, giving the following error: This application failed to start because it could not find or load the Qt platform plugin "windows". Reinstalling the application may fix this problem.

    After spending 4 days trying to figure out what was going on, we found out there is a hardcoded path in Qt5Core.dll to load the plugins, particularly the file wmfengine.dll. Make sure you compile Qt5Core to not have this hardcoded path (:\Qt\5.5\msvc2010).

    screenshot of WinDiff

    Hardcoded path in Qt5Core.dll failing the plugin wmfengine.dll to load

    0 讨论(0)
  • 2020-12-05 04:58

    The better choice is use: windeployqt.exe. This tool resolves the all dependencies of your application.exe.

    0 讨论(0)
  • 2020-12-05 04:59

    for notepad tutorial, on win7 & qt5.1.1

    the deploy steps is:

    * change build mode to release, not debug,
    * build,
    * create a output folder somewhere
        e.g. desktop/notepad/
    * 
    * copy file to output folder
        file list:
        * from "workspace_home/build-notepad-xxx-Release/release"
            * notepad.exe
        * from "qt_home/5.1.1/msvc2010/bin"
            * icudt51.dll
            * icuin51.dll
            * icuuc51.dll
            * libEGL.dll
            * libGLESv2.dll
            * Qt5Core.dll
            * Qt5Gui.dll
            * Qt5Widgets.dll
            * 
        * from "qt_home/5.1.1/msvc2010/plugins/platforms"
            * platforms/ (need to create this sub folder in the output folder)
                * qwindows.dll
            * 
        * 
    * 
    * run the .exe file, make sure it works,
    * 
    * ok
    * 
    
    0 讨论(0)
  • 2020-12-05 05:05

    It seems that an empty qt.conf located in the same directory as the application is causing trouble starting a Qt5 app on Windows 7. Try to delete it.

    0 讨论(0)
提交回复
热议问题