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. Making a standalone Qt application on Windows
Forum Updated to NodeBB v4.3 + New Features

Making a standalone Qt application on Windows

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
23 Posts 4 Posters 4.1k Views 3 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.
  • S Offline
    S Offline
    Sucharek
    wrote on last edited by
    #1

    Hi. I've been trying to make a standalone Qt application for Windows, but I seem to have no luck. I looked on Google, and found that you can make a static version of Qt, and it will make a standalone application, but I can't seem to get it working.
    Here's the page link I found this on: https://stackoverflow.com/questions/22291017/download-qt-static-build-on-windows#
    I use Qt version 5.15.2 and they used 5.2.1. Does that make a difference?
    On the command "mingw32-make -j 4" it gave me an error:

    mingw32-make: *** No targets specified and no makefile found.  Stop.
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you properly call configure ?

      By the way, did you also check the constraints of the GPL/LGPL licenses with regard to static linking ?

      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
      • M Offline
        M Offline
        mchinand
        wrote on last edited by
        #3

        As @SGaist wrote, check the output from the configure step to see if it completed successfully. Also, check out the official build instructions as the configuration options may have changed in the almost 8 years since that Stackoverflow post.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Sucharek
          wrote on last edited by
          #4

          Ok, I will run configure again, and check for any errors.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Sucharek
            wrote on last edited by Sucharek
            #5

            I ran the configure again in the same folder I ran it as first, and I got a message that I could actually build it now. So I ran it, and while it was building, it gave me an error:

            In file included from declarativemaps\qdeclarativepolylinemapitem.cpp:38:
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:381:17: error: 'const char* MapPolylineShaderLineStrip::vertexShader() const' marked 'override', but does not override
                 const char *vertexShader() const override {
                             ^~~~~~~~~~~~
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:397:17: error: 'const char* MapPolylineShaderLineStrip::fragmentShader() const' marked 'override', but does not override
                 const char *fragmentShader() const override {
                             ^~~~~~~~~~~~~~
            declarativemaps\qdeclarativepolylinemapitem_p_p.h: In member function 'virtual void MapPolylineShaderLineStrip::initialize()':
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:411:23: error: 'program' was not declared in this scope
                     m_matrix_id = program()->uniformLocation("qt_Matrix");
                                   ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem_p_p.h: At global scope:
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:435:17: error: 'const char* MapPolylineShaderExtruded::vertexShader() const' marked 'override', but does not override
                 const char *vertexShader() const override
                             ^~~~~~~~~~~~
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:440:17: error: 'const char* MapPolylineShaderExtruded::fragmentShader() const' marked 'override', but does not override
                 const char *fragmentShader() const override
                             ^~~~~~~~~~~~~~
            declarativemaps\qdeclarativepolylinemapitem_p_p.h: In member function 'virtual void MapPolylineShaderExtruded::initialize()':
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:455:23: error: 'program' was not declared in this scope
                     m_matrix_id = program()->uniformLocation("qt_Matrix");
                                   ^~~~~~~
            In file included from ..\..\include\QtLocation\5.15.2/QtLocation/private/qdeclarativepolygonmapitem_p_p.h:1,
                             from declarativemaps\qdeclarativerectanglemapitem_p_p.h:53,
                             from declarativemaps\qdeclarativepolylinemapitem.cpp:39:
            C:/Qt/5.15.2-static/qtlocation/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h: At global scope:
            C:/Qt/5.15.2-static/qtlocation/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h:152:17: error: 'const char* MapPolygonShader::vertexShader() const' marked 'override', but does not override
                 const char *vertexShader() const override {
                             ^~~~~~~~~~~~
            C:/Qt/5.15.2-static/qtlocation/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h:168:17: error: 'const char* MapPolygonShader::fragmentShader() const' marked 'override', but does not override
                 const char *fragmentShader() const override {
                             ^~~~~~~~~~~~~~
            C:/Qt/5.15.2-static/qtlocation/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h: In member function 'virtual void MapPolygonShader::initialize()':
            C:/Qt/5.15.2-static/qtlocation/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h:186:23: error: 'program' was not declared in this scope
                     m_matrix_id = program()->uniformLocation("qt_Matrix");
                                   ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp: In member function 'virtual void MapPolylineShaderLineStrip::updateState(const QSGMaterialShader::RenderState&, QSGMaterial*, QSGMaterial*)':
            declarativemaps\qdeclarativepolylinemapitem.cpp:1552:9: error: 'program' was not declared in this scope
                     program()->setUniformValue(m_color_id, v);
                     ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp:1557:9: error: 'program' was not declared in this scope
                     program()->setUniformValue(m_matrix_id, state.projectionMatrix());
                     ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp:1560:5: error: 'program' was not declared in this scope
                 program()->setUniformValue(m_mapProjection_id, geoProjection);
                 ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp: In member function 'virtual void MapPolylineShaderExtruded::updateState(const QSGMaterialShader::RenderState&, QSGMaterial*, QSGMaterial*)':
            declarativemaps\qdeclarativepolylinemapitem.cpp:1768:9: error: 'program' was not declared in this scope
                     program()->setUniformValue(m_color_id, v);
                     ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp:1773:9: error: 'program' was not declared in this scope
                     program()->setUniformValue(m_matrix_id, state.projectionMatrix());
                     ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp:1777:5: error: 'program' was not declared in this scope
                 program()->setUniformValue(m_mapProjection_id, geoProjection);
                 ^~~~~~~
            mingw32-make[4]: *** [Makefile.Release:35989: .obj/release/qdeclarativepolylinemapitem.o] Error 1
            mingw32-make[4]: Leaving directory 'C:/Qt/5.15.2-static/qtlocation/src/location'
            mingw32-make[3]: *** [Makefile:49: release-all] Error 2
            mingw32-make[3]: Leaving directory 'C:/Qt/5.15.2-static/qtlocation/src/location'
            mingw32-make[2]: *** [Makefile:184: sub-location-make_first] Error 2
            mingw32-make[2]: Leaving directory 'C:/Qt/5.15.2-static/qtlocation/src'
            mingw32-make[1]: *** [Makefile:52: sub-src-make_first] Error 2
            mingw32-make[1]: Leaving directory 'C:/Qt/5.15.2-static/qtlocation'
            mingw32-make: *** [Makefile:819: module-qtlocation-make_first] Error 2
            

            I didn't think much of it, and ran "mingw32-make install", but I got another error:

            In file included from declarativemaps\qdeclarativepolylinemapitem.cpp:38:
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:381:17: error: 'const char* MapPolylineShaderLineStrip::vertexShader() const' marked 'override', but does not override
                 const char *vertexShader() const override {
                             ^~~~~~~~~~~~
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:397:17: error: 'const char* MapPolylineShaderLineStrip::fragmentShader() const' marked 'override', but does not override
                 const char *fragmentShader() const override {
                             ^~~~~~~~~~~~~~
            declarativemaps\qdeclarativepolylinemapitem_p_p.h: In member function 'virtual void MapPolylineShaderLineStrip::initialize()':
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:411:23: error: 'program' was not declared in this scope
                     m_matrix_id = program()->uniformLocation("qt_Matrix");
                                   ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem_p_p.h: At global scope:
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:435:17: error: 'const char* MapPolylineShaderExtruded::vertexShader() const' marked 'override', but does not override
                 const char *vertexShader() const override
                             ^~~~~~~~~~~~
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:440:17: error: 'const char* MapPolylineShaderExtruded::fragmentShader() const' marked 'override', but does not override
                 const char *fragmentShader() const override
                             ^~~~~~~~~~~~~~
            declarativemaps\qdeclarativepolylinemapitem_p_p.h: In member function 'virtual void MapPolylineShaderExtruded::initialize()':
            declarativemaps\qdeclarativepolylinemapitem_p_p.h:455:23: error: 'program' was not declared in this scope
                     m_matrix_id = program()->uniformLocation("qt_Matrix");
                                   ^~~~~~~
            In file included from ..\..\include\QtLocation\5.15.2/QtLocation/private/qdeclarativepolygonmapitem_p_p.h:1,
                             from declarativemaps\qdeclarativerectanglemapitem_p_p.h:53,
                             from declarativemaps\qdeclarativepolylinemapitem.cpp:39:
            C:/Qt/5.15.2-static/qtlocation/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h: At global scope:
            C:/Qt/5.15.2-static/qtlocation/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h:152:17: error: 'const char* MapPolygonShader::vertexShader() const' marked 'override', but does not override
                 const char *vertexShader() const override {
                             ^~~~~~~~~~~~
            C:/Qt/5.15.2-static/qtlocation/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h:168:17: error: 'const char* MapPolygonShader::fragmentShader() const' marked 'override', but does not override
                 const char *fragmentShader() const override {
                             ^~~~~~~~~~~~~~
            C:/Qt/5.15.2-static/qtlocation/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h: In member function 'virtual void MapPolygonShader::initialize()':
            C:/Qt/5.15.2-static/qtlocation/src/location/declarativemaps/qdeclarativepolygonmapitem_p_p.h:186:23: error: 'program' was not declared in this scope
                     m_matrix_id = program()->uniformLocation("qt_Matrix");
                                   ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp: In member function 'virtual void MapPolylineShaderLineStrip::updateState(const QSGMaterialShader::RenderState&, QSGMaterial*, QSGMaterial*)':
            declarativemaps\qdeclarativepolylinemapitem.cpp:1552:9: error: 'program' was not declared in this scope
                     program()->setUniformValue(m_color_id, v);
                     ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp:1557:9: error: 'program' was not declared in this scope
                     program()->setUniformValue(m_matrix_id, state.projectionMatrix());
                     ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp:1560:5: error: 'program' was not declared in this scope
                 program()->setUniformValue(m_mapProjection_id, geoProjection);
                 ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp: In member function 'virtual void MapPolylineShaderExtruded::updateState(const QSGMaterialShader::RenderState&, QSGMaterial*, QSGMaterial*)':
            declarativemaps\qdeclarativepolylinemapitem.cpp:1768:9: error: 'program' was not declared in this scope
                     program()->setUniformValue(m_color_id, v);
                     ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp:1773:9: error: 'program' was not declared in this scope
                     program()->setUniformValue(m_matrix_id, state.projectionMatrix());
                     ^~~~~~~
            declarativemaps\qdeclarativepolylinemapitem.cpp:1777:5: error: 'program' was not declared in this scope
                 program()->setUniformValue(m_mapProjection_id, geoProjection);
                 ^~~~~~~
            mingw32-make[4]: *** [Makefile.Release:35989: .obj/release/qdeclarativepolylinemapitem.o] Error 1
            mingw32-make[4]: Leaving directory 'C:/Qt/5.15.2-static/qtlocation/src/location'
            mingw32-make[3]: *** [Makefile:74: release-debug-install] Error 2
            mingw32-make[3]: Leaving directory 'C:/Qt/5.15.2-static/qtlocation/src/location'
            mingw32-make[2]: *** [Makefile:196: sub-location-install_subtargets] Error 2
            mingw32-make[2]: Leaving directory 'C:/Qt/5.15.2-static/qtlocation/src'
            mingw32-make[1]: *** [Makefile:64: sub-src-install_subtargets] Error 2
            mingw32-make[1]: Leaving directory 'C:/Qt/5.15.2-static/qtlocation'
            mingw32-make: *** [Makefile:831: module-qtlocation-install_subtargets] Error 2
            

            EDIT: And I also didn't add "-j 4" when I executed the "mingw32-make" command.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Where did you get Qt's sources from ?

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

              S 1 Reply Last reply
              0
              • SGaistS SGaist

                Where did you get Qt's sources from ?

                S Offline
                S Offline
                Sucharek
                wrote on last edited by
                #7

                Hi @SGaist, I got them from here: https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Your error looks odd.

                  I would nuke that build and extract the sources again.

                  Also, please use an out of source build so you don't pollute the source tree and can restart more easily.

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

                  S 1 Reply Last reply
                  1
                  • SGaistS SGaist

                    Your error looks odd.

                    I would nuke that build and extract the sources again.

                    Also, please use an out of source build so you don't pollute the source tree and can restart more easily.

                    S Offline
                    S Offline
                    Sucharek
                    wrote on last edited by
                    #9

                    Hi @SGaist, ok, I will build it again, but what do you mean by "please use an out of source build so you don't pollute the source tree and can restart more easily"?

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Literally what is written: call configure from a folder outside of the sources.

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

                      S 2 Replies Last reply
                      1
                      • SGaistS SGaist

                        Literally what is written: call configure from a folder outside of the sources.

                        S Offline
                        S Offline
                        Sucharek
                        wrote on last edited by
                        #11
                        This post is deleted!
                        1 Reply Last reply
                        0
                        • SGaistS SGaist

                          Literally what is written: call configure from a folder outside of the sources.

                          S Offline
                          S Offline
                          Sucharek
                          wrote on last edited by Sucharek
                          #12

                          @SGaist ok, but how do I call configure from a folder that doesn't have the configure.bat file?

                          jsulmJ 1 Reply Last reply
                          0
                          • S Sucharek

                            @SGaist ok, but how do I call configure from a folder that doesn't have the configure.bat file?

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            @Sucharek said in Making a standalone Qt application on Windows:

                            but how do I call configure from a folder that doesn't have the configure.bat file?

                            By providing path to it? Either relative to your build folder or absolute path:

                            ../QT_SRC_FOLDER/configure
                            

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            S 1 Reply Last reply
                            1
                            • jsulmJ jsulm

                              @Sucharek said in Making a standalone Qt application on Windows:

                              but how do I call configure from a folder that doesn't have the configure.bat file?

                              By providing path to it? Either relative to your build folder or absolute path:

                              ../QT_SRC_FOLDER/configure
                              
                              S Offline
                              S Offline
                              Sucharek
                              wrote on last edited by
                              #14

                              Hi @jsulm, ok I'll try that.

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                Sucharek
                                wrote on last edited by
                                #15

                                Hi, so I built it again, and got the same error. The error is from QLocation, to on configure can I use "-nomake qlocation", or something like that? Also, the build takes about 10 hours, so that's why I'm responding after a very long time.

                                jsulmJ 1 Reply Last reply
                                0
                                • S Sucharek

                                  Hi, so I built it again, and got the same error. The error is from QLocation, to on configure can I use "-nomake qlocation", or something like that? Also, the build takes about 10 hours, so that's why I'm responding after a very long time.

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  @Sucharek Call "configure -h" (or --help) to get the list of parameters it understands.

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  S 1 Reply Last reply
                                  0
                                  • jsulmJ jsulm

                                    @Sucharek Call "configure -h" (or --help) to get the list of parameters it understands.

                                    S Offline
                                    S Offline
                                    Sucharek
                                    wrote on last edited by
                                    #17

                                    Hi @jsulm, ok I'll try that. Also, I ran the mingw32-make with -i (ignore errors), and it just ignored the qlocation errors, and don't see any more of them. I don't need QLocation, so it's fine if I don't have it. If it wouldn't work, I'll try the -configure myself to see if I can clear some more thing out. After the compile is done, I'll update you if I have any more issues.

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      Sucharek
                                      wrote on last edited by Sucharek
                                      #18

                                      Hi, so it actually proceeded to build in install, but when I add it in Qt versions in Qt creator, it says "No QML utility installed".
                                      EDIT: The only error was the QLocation

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        Sucharek
                                        wrote on last edited by
                                        #19

                                        Hi, so I ran the installation with my own command, which took about 40 hours, installed it, but got the same error in Qt Creator. No QML utility installed. Do I need to run something else, not "mingw32-make install"?

                                        jsulmJ 1 Reply Last reply
                                        0
                                        • S Sucharek

                                          Hi, so I ran the installation with my own command, which took about 40 hours, installed it, but got the same error in Qt Creator. No QML utility installed. Do I need to run something else, not "mingw32-make install"?

                                          jsulmJ Offline
                                          jsulmJ Offline
                                          jsulm
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #20

                                          @Sucharek said in Making a standalone Qt application on Windows:

                                          No QML utility installed

                                          I don't know what QML utility. Does it work? I mean: can you build your apps using this Qt installation?

                                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          S 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