Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Windows QT Deployment not working (VS2010 + QT 5.4.0)
Forum Updated to NodeBB v4.3 + New Features

Windows QT Deployment not working (VS2010 + QT 5.4.0)

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.6k 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.
  • Y Offline
    Y Offline
    yafes
    wrote on 14 Jan 2015, 15:10 last edited by
    #1

    I have:
    Windows 7 64bit
    Visual Studio 2010
    QT 5.4.0_MSVC2010OpenGL_32bit (opengl)

    When I run the release from QT-Creator, it’s successfully starting the Application. When deploying using windeployqt.exe it’s not working on any other machine, which has not installed QT.

    [IMG]http://i60.tinypic.com/21jvcpy.png[/IMG]

    Threads read so far and applied:

    http://qt-project.org/forums/viewthread/25714/P15
    http://qt-project.org/wiki/Deploy_an_Application_on_Windows
    http://qt-project.org/forums/viewthread/21269

    Tested Solutions not working or partially:

    1) Using windeployqt.exe

    As suggested from Forum threads, I used windeployqt.exe for deploying, the commands I’ve used

    a) First setting the environment variable for my QT version
    @set PATH=C:\Qt\5.4\msvc2010_opengl\bin;%PATH%@

    b) Calling windeployqt.exe with path to my executable
    @windeployqt.exe C:\build-AssetBrowserWidget-Desktop_Qt_5_4_0_MSVC2010_OpenGL_32bit-Debug\debug\AssetBrowserWidget.exe@

    Output of windeployqt.exe:
    @Warning: Cannot find Visual Studio redistributable in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\redist@

    But I files are persistent in:
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\redist\x64\Microsoft.VC100.CRT
    a) msvcp100.dll, msvcr100.dll

    Anyhow this shouldn’t be the problem why the Application is not starting. (Go to Point 4 for the Reason)

    2) I tried the naively copying copying all .dll files (those in Qt) into the root directory of my application
    C:\Qt\5.4\msvc2010_opengl\bin
    C:\Qt\5.4\msvc2010_opengl\plugins

    I tried as well to copy the insides of plugins all *.dll to the root

    This didn’t change anything

    3) I tried to setting the library Path in my Code before the QApplication is started and this worked partially

    a)
    @ b<<".";
    QApplication::setLibraryPaths(b);@

    This starts the Application, but obviously the plugins are not fully loaded, as the SQLite module isn’t working. The folders* sqldrivers, imageformats, iconengines,* are not touched, as i can remove them and nothing changes. The qwindow.dll which is under “paltforms” is seen by the application, when i remove the folder platforms, the application is starting and crashing immediately like before.

    b)
    I tried to set the Path to the plugin
    @QApplication::addLibraryPath( QApplication::applicationDirPath() + QDir::separator() + "plugins");@

    4) Hiding System Files on developement machine
    One more thing to mention, when i "hide" the* C:\Qt\5.4\msvc2010_opengl* folder then my application isn't starting on my development machine either, so i am sure, some files in this directory are missing.

    I am completely lost and i am really asking, why every other bit in Qt is smooth but the deployment process is obviously not out of the box.__

    Here i am posting as well my Pro file:
    @CONFIG +=c++11

    QT += core widgets gui multimedia designer sql

    TARGET = AssetBrowserWidget
    TEMPLATE = app

    SOURCES += main.cpp
    widget.cpp
    globals.cpp
    Thumbnail.cpp
    metadata.cpp
    thumbcontainer.cpp

    HEADERS += widget.h
    globals.h
    Thumbnail.h
    metadata.h
    thumbcontainer.h

    FORMS += widget.ui

    RESOURCES += Style.qrc

    RESOURCES +=
    OTHER_FILES +=
    @

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hskoglund
      wrote on 14 Jan 2015, 19:15 last edited by
      #2

      Hi, agreed deployment of Qt apps can be troublesome, I think you need a complete list of the DLLs used by your app:
      Start your app from Qt Creator, then try this utility: "ListDLLs":http://technet.microsoft.com/en-us/sysinternals/bb896656.aspx

      Launch ListDLLs from a CMD window, e.g. "listdlls AssetBrowserWidget", then you'll see where the plugins are loaded from.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 14 Jan 2015, 21:55 last edited by
        #3

        Hi and welcome to devnet,

        Do you have any error message ?

        Note that you are trying to deploy a debug build, you should first make it a release

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          yafes
          wrote on 14 Jan 2015, 23:45 last edited by
          #4

          @hskoglund i will give that a try tomorrow
          @SGaist the error message is somehow gone, i had it as an image, but it was something like "runtime error" without much informaiton. Furthermore i tested it both with Release and Debug.

          1 Reply Last reply
          0

          1/4

          14 Jan 2015, 15:10

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved