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. Failed to find platform after deploy Qt5.2 compiled desktop app
Forum Updated to NodeBB v4.3 + New Features

Failed to find platform after deploy Qt5.2 compiled desktop app

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 2 Posters 1.9k 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.
  • A Offline
    A Offline
    airwaywong
    wrote on last edited by
    #1

    I downloaded and installed qt-windows-opensource-5.2.0-msvc2012-x86_64-offline.exe on Win7, with VS2012.

    After successfully compiled a desktop app, I want to deploy it to a different machine. To test it, I removed "QtDir\bin" from my PATH environment variable. The app starts to complain missing various dlls.

    I copied all necessary dlls to the same directory as the app executable, until I saw a strange error message:

    • This application failed to start because it could not find or load the Qt platform plugin "windows".

    After searching the forum, I have created directory containing platform dlls with path

    • platforms\qwindows.dll

    However, the error still persist unless I add back "QtDir\bin" to PATH.

    Could someone help find out what could the possible problems?

    Thanks.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Please read the official "deployment guide":http://qt-project.org/doc/qt-5/windows-deployment.html.

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        airwaywong
        wrote on last edited by
        #3

        Thanks for the link.

        I have read the article and tried all possible options:

        • use addLibraryPath
        • use qt.conf
          But still no luck.

        The problem is I don't know how to debug this, or at least make the app print out the actual library path. The app just print an error message in the dialog and exit.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          -Use the Dependency Walker.-

          -If you want to print PATH from within your application, you can do so with getenv/ qgetenv. That will obviously not work if there are any DLLs missing, as the error message is displayed by the Operating System even before the application is started.-

          EDIT sorry for double-posting, the forum was having some trouble publishing my post.

          (Z(:^

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            Use the Dependency Walker, and really make sure you follow the whole guide: I know it's a long and boring read, but it really works ;) I know for some people, the problem is caused by missing OpenGL libraries, you can check those.

            If you want to print PATH from within your application, you can do so with getenv or qgetenv. That will obviously not work if there are any DLLs missing, as the error message is displayed by the Operating System even before the application is started.

            (Z(:^

            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