Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Unable to find the platform plugin while deploying application



  • Hi,

    I tried to deploy test application built with MSVC 2017 x64 on WIndows 10 x64 but windeployqt.exe says:

    • Adding Qt5Network for qmldbg_debugger.dll
    • Adding Qt5Gui for qmldbg_inspector.dll
    • Direct dependencies: Qt5Core
    • All dependencies : Qt5Core
    • To be deployed : Qt5Core Qt5Gui Qt5Network Qt5Qml Qt5Quick
    • Unable to find the platform plugin.

    I read some sources in that topic such as here but I dont'use MinGW and still have such problem
    Qt version 5.12.6
    My Qt configuration:
    887f6f87-218a-435a-9ed8-4471a37a09b9-image.png



  • Hi, you don't really need windeployqt to make your Qt app run on another Windows 10 computer. Windeployqt iis a convenient tool but you can also copy the needed .dlls by yourself.

    One way: first start your app, then download ListDLLs. Use it to create a list of all the .dlls your app is using.
    Copy all the .dlls that are not from C:\Windows\System32 into the same folder as your .exe file. (The plugin .dlls need to be in their own subdirectories)

    Go to the other Windows 10 computer, install the MSVC2017 64-bit redistributable. Then copy the folder from your development machine. With a bit of luck your app should start.



  • Hi, you don't really need windeployqt to make your Qt app run on another Windows 10 computer. Windeployqt iis a convenient tool but you can also copy the needed .dlls by yourself.

    One way: first start your app, then download ListDLLs. Use it to create a list of all the .dlls your app is using.
    Copy all the .dlls that are not from C:\Windows\System32 into the same folder as your .exe file. (The plugin .dlls need to be in their own subdirectories)

    Go to the other Windows 10 computer, install the MSVC2017 64-bit redistributable. Then copy the folder from your development machine. With a bit of luck your app should start.



  • @hskoglund Thank you!
    I have not tried it yet but I'm going to
    I believe that should work



  • Note that some dlls may be loaded lazily when particular feature of application is in use, e.g. Qt Multimedia plugins may be loaded only when you play something, or OpenSSL loaded when first https request is made



  • @hskoglund I'm trying to use ListDLLs. I open cmd command line and go to the folder where my .exe is. Then I run the following command:

    • C:\apps\ListDlls\listdlls C:\Users\tasik\Documents\Qt_Projects\build-OpenMP_proba-Desktop_x86_windows_msvc2017_pe_64bit-Release\release\OpenMP_proba.exe

    Where:

    • C:\apps\ListDlls\listdlls - path and .exe of listdlls
    • C:\Users\tasik\Documents\Qt_Projects\build-OpenMP_proba-Desktop_x86_windows_msvc2017_pe_64bit-Release\release\OpenMP_proba.exe - my exe

    But I only receive:
    Listdlls v3.2 - Listdlls
    Copyright (C) 1997-2016 Mark Russinovich
    Sysinternals

    No matching processes were found.



  • @Please_Help_me_D ListDLLs only care about the name of the program, not the path, so try:

    C:\apps\ListDlls\listdlls Open
    

    (also you don't have to type in all the letters of the program name :-)

    Edit: also make sure that your program is running before starting ListDLLs



  • @hskoglund this doesn't work either :(

    C:\apps\ListDlls\listdlls Open
    

    @hskoglund said in Unable to find the platform plugin while deploying application:

    also make sure that your program is running before starting ListDLLs

    Didn't understand that. COuld you please explain a little bit more?
    If I just "double click" on OpenMP_proba.exe I get an error that I don't have some Qt ddl's.
    This .exe file is created after I compile it in Qt in release mode.
    By the way I use MSVC x64 compilator but Listdlls64 also doesn't work (is Listdlls64 is used to compile 64 bit apps?)



  • You do not need to be able to run your program by double clicking on it, it's sufficient if can run your program from inside Qt Creator.
    Also it doesn't matter if you use ListDLLs.exe or ListDLLs64.exe, they'll give you the same result.



  • @hskoglund yes, something strange is going on on my pc :)
    don't know how to lauch it correctly
    I just tried to run listdlls with other .exe files but the same error I get. But I can run for example:

    C:\apps\ListDlls\Listdlls O
    

    The output:

    Listdlls v3.2 - Listdlls
    Copyright (C) 1997-2016 Mark Russinovich
    Sysinternals
    
    ------------------------------------------------------------------------------
    OneDrive.exe pid: 8332
    Command line: "C:\Users\tasik\...\OneDrive.exe" /background
    
    Base                Size      Path
    0x0000000000f40000  0x185000  C:\Users\tasik\...\OneDrive.exe
    

    etc.



  • @hskoglund Well I could lauch it correctly only when I lauched it in Qt and while it was compiling I ran listdlls. But my .exe runs only 2 second so I have only 2 second to launch listdlls. Is there is a way use listdlls in other way?



  • If your program starts, then you can put in a delay somewhere, for example:

    for (;;);
    

    so that you will have time to run ListDLLs


Log in to reply