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. [Solved] Static Build doesn't run on other PCs (Windows)
Forum Updated to NodeBB v4.3 + New Features

[Solved] Static Build doesn't run on other PCs (Windows)

Scheduled Pinned Locked Moved General and Desktop
staticwindowsqmlbuild
2 Posts 1 Posters 1.4k Views 2 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
    Armalyte
    wrote on last edited by Armalyte
    #1

    Hi all,

    I have tried creating static builds of my application that I can run on other PCs that don't have Qt installed (the whole point of a static build...)

    While I can build my application, and it runs fine on my Windows 7 Machine, it does not run on other computers.
    Well, it does run (the process shows up in the Task Manager), but no window appears.

    I'm using the C++ portion of my application only start up QML. The rest is all done in QML.

    Now, when I complied Qt 5.4.0, I used the following options:

     configure.bat -static -debug-and-release -platform win32-g++ -prefix 5.4.0-static -opengl desktop -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests
    

    My main.cpp looks like this:

    #include <QApplication>
    #include <QQmlApplicationEngine>
    #include <QQuickView>
    #include <QtQml>
    
    int main(int argc, char *argv[])
    {
        QApplication app(argc, argv);
        QQmlApplicationEngine engine;
        engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
        return app.exec();
    }
    

    If that makes any difference, in the QML code, I include items like:

    import QtQuick 2.4
    import QtQuick.Layouts 1.1
    import QtQuick.Controls 1.3
    import QtQuick.Window 2.2
    import QtQuick.Dialogs 1.2
    

    But, yes, as mentioned below, I can build this, and it works on my PC.
    On other PCs, I can see the process running in the Task Manager, but the Application Window does not appear.

    Any pointers in where I go wrong are appreciated!
    Thanks!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Armalyte
      wrote on last edited by
      #2

      As it turns out, I needed to add the "QtQuick" and "QtQuick.2" folders in the same directory as my *.exe file.

      This wiki page brought me on the right path.

      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