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. How to build Qt510 static version on Win7?
Forum Updated to NodeBB v4.3 + New Features

How to build Qt510 static version on Win7?

Scheduled Pinned Locked Moved Installation and Deployment
10 Posts 4 Posters 3.4k 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.
  • C Offline
    C Offline
    cokefish
    wrote on last edited by
    #1

    Any body who please give me some instructions on how to build Qt510 static on Win7.

    I would like to build app without needing with deploying a lot of Qt**.dll.
    I found on wiki that I must build a static version QT510 by myself.

    I am using a Win7(x64) and have installed VS2012 express and Windows SDK for Windows 8
    I also download
    qt-windows-opensource-5.1.0-msvc2012_opengl-x86_64-offline.exe
    and
    qt-everywhere-opensource-src-5.1.0.zip

    If I want to rebuild QT510 static version, which source I should choose?
    And the thing most bothers me is I cannot select the input option of configure tool.

    Please help me, the most welcomed answer is give me the detail steps and command line input.

    Thank you.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Please mind the licensing problems while using static build of Qt. .exe package contains precompiled libraries - that is not what you need.

      You need to extract the ZIP archive, then browse to the folder in cmd.exe and type:
      @
      configure -prefix "./qtbase" -static
      nmake sub-src
      @

      (Z(:^

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cokefish
        wrote on last edited by
        #3

        Why this prompt

        bq. NMAKE : fatal error U1073: don't know how to make 'sub-src'

        I use the cmd window as below, or else I cannot find nmake in my env.

        C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft Visual Studio 2012\Visual Studio Tools\Developer Command Prompt for VS2012.lnk

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          OK, delete the last one, extract again, and now let's try the old Qt4 way:
          @
          configure -developer-build -static -dont-process
          qtbase/bin/qmake projects.pro QT_BUILD_PARTS="libs" JAVASCRIPTCORE_JIT="yes"
          nmake
          @

          (Z(:^

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cokefish
            wrote on last edited by
            #5

            Yes, I found that only nmake is working

            @
            configure -prefix "./qtbase" -static
            nmake @

            I will first wait it for finishing, and then try the Qt4 way.

            Thank you slerdzlo.
            Thank you very much.

            I will give my feedback.

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              You can also try without -prefix or -developer-build. I always add it because I'm running multiple Qt versions in parallel. But if you only want one single Qt installation, you can skip those flags (but then you need to run "nmake install" as an additional step at the end).

              (Z(:^

              1 Reply Last reply
              0
              • C Offline
                C Offline
                cokefish
                wrote on last edited by
                #7

                Oh, I have met the problem below ,
                twice.

                @bq. include" -I"........\include\QtWidgets" -I"........\include\QtGui" -I"...
                .....\include\QtANGLE" -I"........\include\QtCore" -I".moc\debug_static" -I
                "........\mkspecs\win32-msvc2012" -Fo.obj\debug_static\ @C:\Users\HY001354\Ap
                pData\Local\Temp\nmC18F.tmp
                moc_languagechooser.cpp
                moc_mainwindow.cpp
                Generating Code...
                echo 1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID / 24 / RT_MANIFEST / "de
                bug\i18n.exe.embed.manifest">debug\i18n.exe_manifest.rc
                if not exist debug\i18n.exe if exist debug\i18n.exe.embed.manifest del d
                ebug\i18n.exe.embed.manifest
                if exist debug\i18n.exe.embed.manifest copy /Y debug\i18n.exe.embed.mani
                fest debug\i18n.exe_manifest.bak
                link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFEST
                DEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.
                0' publicKeyToken='6595b64144ccf1df' language='
                ' processorArchitecture='*'" /MA
                NIFEST /MANIFESTFILE:debug\i18n.exe.embed.manifest /OUT:debug\i18n.exe @C:\Users
                \HY001354\AppData\Local\Temp\nmCA75.tmp
                Creating library debug\i18n.lib and object debug\i18n.exp
                debug\i18n.exe : fatal error LNK1180: insufficient disk space to complete link
                NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
                \VC\BIN\link.EXE"' : return code '0x49c'
                Stop.
                NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0
                \VC\BIN\nmake.exe"' : return code '0x2'
                Stop.
                NMAKE : fatal error U1077: 'cd' : return code '0x2'
                Stop.
                NMAKE : fatal error U1077: 'cd' : return code '0x2'
                Stop.
                NMAKE : fatal error U1077: 'cd' : return code '0x2'
                Stop.
                NMAKE : fatal error U1077: 'cd' : return code '0x2'
                Stop.@

                one is using
                @configure -prefix "./qtbase" -static
                nmake@

                and the second is using
                @configure -static
                nmake@

                by the way, the second time, the temporary generated files are really huge,

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

                  Hi,

                  From the error, your hard drive seems to be almost full, you'll have to make some room to compile 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
                  • K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #9

                    well, what do you mean with really huge?

                    Obviously, you attempted several times to configure and compile Qt libs. Did you at least always do an "nmake confclean" in between?

                    Otherwise you might a mixture of different leftovers, which is not really helpful. Personally, I would suggest to start-over with a complete fresh setup with downloaded .zip file.

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    0
                    • sierdzioS Offline
                      sierdzioS Offline
                      sierdzio
                      Moderators
                      wrote on last edited by
                      #10

                      [quote author="koahnig" date="1375689047"]Personally, I would suggest to start-over with a complete fresh setup with downloaded .zip file. [/quote]

                      +1. If you want to make this super-easy for yourself in the future, use git :) Then a simple
                      @
                      git clean -dxf
                      @

                      Leaves you with a fresh repo - no need to delete old path and extract the zip again.

                      (Z(:^

                      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