Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Qt 5.1.1. Win7. How to build an application statically
Qt 6.12 LTS is out! See what's new in the release blog

[SOLVED] Qt 5.1.1. Win7. How to build an application statically

Scheduled Pinned Locked Moved General and Desktop
39 Posts 2 Posters 38.1k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #4

    Hi,

    No, configure can be found in Qt's sources.
    Yes, you can have as much version of Qt you need (and enough space on your hard drive)

    If you want several build of Qt, consider out of source building, otherwise you'll end up with several copies of the sources which are not needed.

    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
    • 8Observer88 Offline
      8Observer88 Offline
      8Observer8
      wrote on last edited by
      #5

      Hi, thank you very much!

      What is "configure"?

      I tried to run it from "Administrator: Qt 5.1.1 for Desktop (MinGW 4.8 32 bit":
      [CODE]
      C:\Qt\Qt5.1.1\5.1.1\Src>configure -static
      'configure' is not recognized as an internal or external command,
      operable program or batch file.[/CODE]

      1 Reply Last reply
      0
      • 8Observer88 Offline
        8Observer88 Offline
        8Observer8
        wrote on last edited by
        #6

        I want to work with OpenGL. Do I need a flag -opengl desktop?

        1 Reply Last reply
        0
        • 8Observer88 Offline
          8Observer88 Offline
          8Observer8
          wrote on last edited by
          #7

          What does this mean?

          [CODE]
          WARNING: The DirectX SDK could not be detected:
          There is no Direct X SDK installed or the environment variable "DXSDK_DIR" is
          not set.
          Disabling the ANGLE backend.

          WARNING: Using OpenGL ES 2.0 without ANGLE.
          Specify -opengl desktop to use Open GL.
          The build will most likely fail.
          [/CODE]

          1 Reply Last reply
          0
          • 8Observer88 Offline
            8Observer88 Offline
            8Observer8
            wrote on last edited by
            #8

            Please, help me!!!

            1 Reply Last reply
            0
            • 8Observer88 Offline
              8Observer88 Offline
              8Observer8
              wrote on last edited by
              #9

              I ran mingw32-make confclean

              Please, say me what should I do?

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

                Please, have some patience.

                Unless you add -no-opengl, you'll get an OpenGL build. Without any precision on Windows, it will be an ANGLE build. If you add -opengl desktop you'll get a standard OpenGL build.

                Run configure and then call mingw32-make.

                I would advise using an out of source build, to avoid polluting the source tree with the files generated by the configure/compilation processes.

                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
                • 8Observer88 Offline
                  8Observer88 Offline
                  8Observer8
                  wrote on last edited by
                  #11

                  Thank you very much!

                  I have now the default installation of Qt with course is here: C:\Qt\Qt5.1.1\5.1.1\Src\qtbase

                  Should I to create another folder and copy to here of the course? For example: C:\Qt\Qt5.1.1_static\5.1.1\Src\qtbase

                  Should I run this commands:
                  configure -static -opengl desktop
                  mingw32-make

                  Should I intall DirectX SDK?

                  Can I use DirectX from Qt?

                  1 Reply Last reply
                  0
                  • 8Observer88 Offline
                    8Observer88 Offline
                    8Observer8
                    wrote on last edited by
                    #12

                    I installed DirectX SDK from here: http://www.microsoft.com/en-us/download/confirmation.aspx?id=6812

                    But the error was occured: http://img.pixs.ru/storage/6/5/1/107png_9391316_10038651.png

                    [CODE]
                    Examples installed to.......C:\Qt\Qt5.1.1_static\5.1.1\Src\qtbase\examples
                    Tests installed to..........C:\Qt\Qt5.1.1_static\5.1.1\Src\qtbase\tests
                    WARNING: Using static linking will disable the use of plugins.
                    Make sure you compile ALL needed modules into the library.

                    Generating Makefiles...

                    Qt is now configured for building. Just run mingw32-make.
                    To reconfigure, run mingw32-make confclean and configure.

                    C:\Qt\Qt5.1.1_static\5.1.1\Src\qtbase>mingw32-make
                    cd src/ && ( test -e Makefile || C:/Qt/Qt5.1.1_static/5.1.1/Src/qtbase/bin/qmake
                    C:/Qt/Qt5.1.1_static/5.1.1/Src/qtbase/src/src.pro -o Makefile ) && mingw32-make
                    -f Makefile
                    mingw32-make[1]: Entering directory 'c:/Qt/Qt5.1.1_static/5.1.1/Src/qtbase/src'
                    c:/Qt/Qt5.1.1/5.1.1/Src/qtbase/bin/qmake.exe -o Makefile src.pro
                    process_begin: CreateProcess(NULL, c:/Qt/Qt5.1.1/5.1.1/Src/qtbase/bin/qmake.exe
                    -o Makefile src.pro, ...) failed.
                    make (e=2): The system cannot find the file specified.
                    Makefile:569: recipe for target 'Makefile' failed
                    mingw32-make[1]: *** [Makefile] Error 2
                    mingw32-make[1]: Leaving directory 'c:/Qt/Qt5.1.1_static/5.1.1/Src/qtbase/src'
                    makefile:41: recipe for target 'sub-src-make_first' failed
                    mingw32-make: *** [sub-src-make_first] Error 2
                    [/CODE]

                    1 Reply Last reply
                    0
                    • 8Observer88 Offline
                      8Observer88 Offline
                      8Observer8
                      wrote on last edited by
                      #13

                      I added to PATH C:\Qt\Qt5.1.1_static\5.1.1\mingw48_32\bin

                      But:

                      [CODE]
                      C:\Qt\Qt5.1.1_static\5.1.1\Src\qtbase>mingw32-make
                      cd src/ && ( test -e Makefile || C:/Qt/Qt5.1.1_static/5.1.1/Src/qtbase/bin/qmake
                      C:/Qt/Qt5.1.1_static/5.1.1/Src/qtbase/src/src.pro -o Makefile ) && mingw32-make
                      -f Makefile
                      mingw32-make[1]: Entering directory 'c:/Qt/Qt5.1.1_static/5.1.1/Src/qtbase/src'
                      c:/Qt/Qt5.1.1/5.1.1/Src/qtbase/bin/qmake.exe -o Makefile src.pro
                      process_begin: CreateProcess(NULL, c:/Qt/Qt5.1.1/5.1.1/Src/qtbase/bin/qmake.exe
                      -o Makefile src.pro, ...) failed.
                      make (e=2): The system cannot find the file specified.
                      Makefile:569: recipe for target 'Makefile' failed
                      mingw32-make[1]: *** [Makefile] Error 2
                      mingw32-make[1]: Leaving directory 'c:/Qt/Qt5.1.1_static/5.1.1/Src/qtbase/src'
                      makefile:41: recipe for target 'sub-src-make_first' failed
                      mingw32-make: *** [sub-src-make_first] Error 2
                      [/CODE]

                      Please, help me!

                      1 Reply Last reply
                      0
                      • 8Observer88 Offline
                        8Observer88 Offline
                        8Observer8
                        wrote on last edited by
                        #14

                        I am building now from C:\Qt\Qt5.1.1\5.1.1\Src\qtbase

                        I ran mingw32-make

                        It is building now successfully

                        Should I run mingw32-make install later?

                        1 Reply Last reply
                        0
                        • 8Observer88 Offline
                          8Observer88 Offline
                          8Observer8
                          wrote on last edited by
                          #15

                          I waited 2-3 hours. Now I see:

                          [CODE]
                          -lqwindowsd -lwinspool -lshlwapi -lQt5PlatformSupportd -lQt5Guid -lcomdlg32 -lol
                          eaut32 -limm32 -lwinmm -lglu32 -lopengl32 -lgdi32 -lQt5Cored -lole32 -luuid -lws
                          2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lz
                          c:/qt/qt5.1.1/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../..
                          /i686-w64-mingw32/bin/ld.exe: final link failed: No space left on device
                          collect2.exe: error: ld returned 1 exit status
                          Makefile.Debug:79: recipe for target 'debug/tutorial2.exe' failed
                          mingw32-make[4]: *** [debug/tutorial2.exe] Error 1
                          mingw32-make[4]: Leaving directory 'c:/Qt/Qt5.1.1/5.1.1/Src/qtbase/examples/qtes
                          tlib/tutorial2'
                          Makefile:34: recipe for target 'debug' failed
                          mingw32-make[3]: *** [debug] Error 2
                          mingw32-make[3]: Leaving directory 'c:/Qt/Qt5.1.1/5.1.1/Src/qtbase/examples/qtes
                          tlib/tutorial2'
                          Makefile:67: recipe for target 'sub-tutorial2-make_first' failed
                          mingw32-make[2]: *** [sub-tutorial2-make_first] Error 2
                          mingw32-make[2]: Leaving directory 'c:/Qt/Qt5.1.1/5.1.1/Src/qtbase/examples/qtes
                          tlib'
                          Makefile:278: recipe for target 'sub-qtestlib-make_first' failed
                          mingw32-make[1]: *** [sub-qtestlib-make_first] Error 2
                          mingw32-make[1]: Leaving directory 'c:/Qt/Qt5.1.1/5.1.1/Src/qtbase/examples'
                          makefile:66: recipe for target 'sub-examples-make_first' failed
                          mingw32-make: *** [sub-examples-make_first] Error 2[/CODE]

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

                            Your hard drive is full

                            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
                            • 8Observer88 Offline
                              8Observer88 Offline
                              8Observer8
                              wrote on last edited by
                              #17

                              No, I have 648 MB now

                              How to create a static application?

                              1 Reply Last reply
                              0
                              • 8Observer88 Offline
                                8Observer88 Offline
                                8Observer8
                                wrote on last edited by
                                #18

                                I ran: mingw32-make install It is installing

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

                                  "/i686-w64-mingw32/bin/ld.exe: final link failed: No space left on device" means your hard drive is full.

                                  You don't have everything built.

                                  To build your application statically, use your static version of Qt

                                  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
                                  • 8Observer88 Offline
                                    8Observer88 Offline
                                    8Observer8
                                    wrote on last edited by
                                    #20

                                    Yes, I see. Thank you!

                                    I deleted Qt. I am trying to install it now. May I ignore this errors?
                                    http://img.pixs.ru/storage/6/0/1/108png_3122168_10047601.png
                                    http://i7.pixs.ru/storage/6/4/9/109png_4051130_10047649.png

                                    How can I solve it?

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

                                      Are you sure you have enough space on your hard drive ?

                                      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
                                      • 8Observer88 Offline
                                        8Observer88 Offline
                                        8Observer8
                                        wrote on last edited by
                                        #22

                                        15GB - free space

                                        1 Reply Last reply
                                        0
                                        • 8Observer88 Offline
                                          8Observer88 Offline
                                          8Observer8
                                          wrote on last edited by
                                          #23

                                          How many GBs are require?

                                          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
                                          • Unsolved