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

                      How to prevent the building of examples?

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

                        It's bulding 8 hours. It taked more than 50 GB

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

                          I see addressbook every time.....

                          bq. -DUNICODE -DQT_NO_EXCEPTIONS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NE
                          EDS_QMAIN -I. -I'../../../../../include' -I'../../../../../include/QtWidgets' -I
                          '../../../../../include/QtGui' -I'../../../../../include/QtCore' -I'.moc/debug_s
                          tatic' -I'../../../../../mkspecs/win32-g++' -o .obj/debug_static/part1_plugin_im
                          port.o part1_plugin_import.cpp
                          C:/Qt/Qt5.1.1_static/5.1.1/Src/qtbase/bin/moc.exe -DUNICODE -DQT_NO_EXCEPTIONS -
                          DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -D__GNUC__ -DWIN32 -
                          I. -I'../../../../../include' -I'../../../../../include/QtWidgets' -I'../../../.
                          ./../include/QtGui' -I'../../../../../include/QtCore' -I'.moc/debug_static' -I'.
                          ./../../../../mkspecs/win32-g++' addressbook.h -o .moc/debug_static/moc_addressb
                          ook.cpp
                          g++ -c -pipe -fno-keep-inline-dllexport -g -fno-exceptions -frtti -Wall -Wextra
                          -DUNICODE -DQT_NO_EXCEPTIONS -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NE
                          EDS_QMAIN -I. -I'../../../../../include' -I'../../../../../include/QtWidgets' -I
                          '../../../../../include/QtGui' -I'../../../../../include/QtCore' -I'.moc/debug_s
                          tatic' -I'../../../../../mkspecs/win32-g++' -o .obj/debug_static/moc_addressbook
                          .o .moc/debug_static/moc_addressbook.cpp
                          g++ -Wl,-subsystem,windows -o debug/part1.exe .obj/debug_static/addressbook.o .o
                          bj/debug_static/main.o .obj/debug_static/part1_plugin_import.o .obj/debug_static
                          /moc_addressbook.o -lmingw32 -lqtmaind -LC:/Qt/Qt5.1.1_static/5.1.1/Src/qtbase/
                          lib -lQt5Widgetsd -LC:/Qt/Qt5.1.1_static/5.1.1/Src/qtbase/plugins/platforms -lqw
                          indowsd -lwinspool -lshlwapi -lQt5PlatformSupportd -lQt5Guid -lcomdlg32 -loleaut
                          32 -limm32 -lwinmm -lglu32 -lopengl32 -lgdi32 -lQt5Cored -lole32 -luuid -lws2_32
                          -ladvapi32 -lshell32 -luser32 -lkernel32 -lz

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

                            When will it finished?

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

                              Add "-nomake examples -nomake tests"

                              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
                                #29

                                I typed this:

                                configure -static -opengl desktop -nomake examples -nomake tests

                                Output:

                                bq. process_begin: CreateProcess(NULL, rm -f project.o option.o property.o main.o io
                                utils.o proitems.o qmakeglobals.o qmakeparser.o qmakeevaluator.o qmakebuiltins.o
                                makefile.o unixmake2.o unixmake.o mingw_make.o winmakefile.o projectgenerator.o
                                meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o msvc_vcproj.o m
                                svc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o gbuild.o ces
                                dkhandler.o qtextcodec.o qutfcodec.o qstring.o qstringbuilder.o qtextstream.o qi
                                odevice.o qmalloc.o qglobal.o qarraydata.o qbytearray.o qbytearraymatcher.o qdat
                                astream.o qbuffer.o qlist.o qfiledevice.o qfile.o qfilesystementry.o qfilesystem
                                engine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.
                                o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qa
                                bstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror
                                .o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.
                                o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o qlogging.o qfilesyste
                                mengine_win.o qfilesystemiterator_win.o qfsfileengine_win.o qlocale_win.o qsetti
                                ngs_win.o qsystemlibrary.o registry.o, ...) failed.
                                make (e=2): The system cannot find the file specified.
                                Makefile:155: recipe for target 'clean' failed
                                mingw32-make: *** [clean] Error 2
                                Cleaning qmake failed, return code 2
                                C:\Qt\Qt5.1.1_static\5.1.1\Src\qtbase>

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

                                  Now I am building of Qt on my old computer with XP. It was configured successfully.

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

                                    It was building on my old computer with XP successfully! It took 1 or 1.5 hour.

                                    Please say me. Should I run this command: mingw32-make install

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

                                      I compiled a simple project. But it was not build statically.

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

                                        I ran this: mingw32-make install

                                        It is installing now. But I see:

                                        bq. can not be copied on top of itself

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

                                          bq. xcopy /s /q /y /i C:\Qt\Qt5.1.1\5.1.1\Src\qtbase\doc\global C:\Qt\Qt5.1.1\5.1.1
                                          Src\qtbase\doc\global

                                          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