Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Building in static mode.
Forum Updated to NodeBB v4.3 + New Features

Building in static mode.

Scheduled Pinned Locked Moved Qt Creator and other tools
17 Posts 2 Posters 10.5k 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.
  • T Offline
    T Offline
    tifil
    wrote on last edited by
    #1

    Hello,

    I want to build in static mode, because I don't want to have dll with my exe.

    So, I followed a tuto.

    In the QtCommand prompt, I put this:

    configure -static
    o (because it asked me open version or commercial version, so o for open)
    y (it asked me if I accept the terms of license)

    Then, it shows me this:

    WARNING: Using static linking will disable the use of plugins.
    Make sure you compile ALL needed modules into the library.
    Creating qmake...
    execute: File or path is not found (mingw32-make)
    execute: File or path is not found (mingw32-make)
    Cleaning qmake failed, return code -1

    So I can't build in static mode, then is there any solution ???

    Thanks a lot.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      Did you start from a source package or did you try to recompile from the sources of a prebuilt binary package?

      Also, for building Qt yourself you should consider installing a complete MinGW environment, including MSYS, instead or additionally to the MinGW installed from the SDK and/or Qt Creator.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tifil
        wrote on last edited by
        #3

        I found a MinGW environment here:

        http://www.mingw.org/wiki/InstallationHOWTOforMinGW

        Then I downloaded it here:

        http://sourceforge.net/projects/mingw/files/MinGW/

        I installed it, then I made the 'configure -static" commande in the Qt Command Prompt.

        But I have an error:

        C:\Qt\4.7.4/src/corelib/tools/qlocale.cpp: In function 'char* qdtoa(double, int,
        int, int*, int*, char**, char**)':
        C:\Qt\4.7.4/src/corelib/tools/qlocale.cpp:6626:14: erreur: '_clear87' was not de
        clared in this scope
        C:\Qt\4.7.4/src/corelib/tools/qlocale.cpp:6627:43: erreur: '_control87' was not
        declared in this scope
        mingw32-make: *** [qlocale.o] Error 1
        Building qmake failed, return code 2

        What is it ???

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          From "C:\Qt\4.7.4" is suspect you to recompile a prebuilt binary. Don't do that!

          Grab a vanilla source package from "here":http://qt.nokia.com/downloads/downloads#qt-lib and compile that.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tifil
            wrote on last edited by
            #5

            I have downloaded it yet, before the MinGW environment.

            When I had the first error, I already installed it. (your link)

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              Sorry, I don't understand what you did.

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tifil
                wrote on last edited by
                #7

                When I posted the first message, "Qt libraries 4.7.4 for Windows (minGW 4.4, 328 MB)" was already installed in my computer.

                But it shows me this error message:

                WARNING: Using static linking will disable the use of plugins.
                Make sure you compile ALL needed modules into the library.
                Creating qmake…
                execute: File or path is not found (mingw32-make)
                execute: File or path is not found (mingw32-make)
                Cleaning qmake failed, return code -1

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on last edited by
                  #8

                  You must not recompile prebuilt binaries of Qt. IIRC that has been written already. Grab the vanilla sources and compile these.

                  Also, you need to have a complete MinGW environment, including MSYS to build the libs. I'm not completely sure (never tried that), but the MinGW installation of the SDK or Qt Creator might not be sufficient.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    tifil
                    wrote on last edited by
                    #9

                    Ok, so where can I download a complete MinGW environment ???

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      goetz
                      wrote on last edited by
                      #10

                      Why not try your favorite search engine and ask for "mingw":http://lmgtfy.com/?q=mingw?

                      http://www.catb.org/~esr/faqs/smart-questions.html

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        tifil
                        wrote on last edited by
                        #11

                        I downloaded this :

                        http://www.mingw.org/wiki/InstallationHOWTOforMinGW

                        But, you told me that he is not correct

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          goetz
                          wrote on last edited by
                          #12

                          You have two packages in the game: a MinGW installation (which looks ok - I installed it using the linked HOWTO too) and the Qt sources.

                          From your paths, I guessed that you used a binary package (likely for MinGW) which happen to contain the sources too. Unfortunately the sources in the binary packages are known to cause problems when recompiling them. So the general advice is to grab the plain (aka "vanilla") sources from the download page and compile from that. The folder containing that sources is usually named qt-everywhere-opensource-src-4.7.4 or similar. Did you get that sources already?

                          To build Qt, you should start the MSYS shell of your MinGW installation. You should have an entry in the start menu of "MinGW Shell" or start C:\MinGW\msys\1.0\msys.bat and run Qt's configure from that.

                          http://www.catb.org/~esr/faqs/smart-questions.html

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            tifil
                            wrote on last edited by
                            #13

                            Yes, I downloaded them.

                            But, in the .bat, what I put ???

                            1 Reply Last reply
                            0
                            • G Offline
                              G Offline
                              goetz
                              wrote on last edited by
                              #14

                              The .bat already exists. You are supposed to execute it. The actual path may differ, depending on where you installed MinGW.

                              http://www.catb.org/~esr/faqs/smart-questions.html

                              1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                tifil
                                wrote on last edited by
                                #15

                                Yes, I have the .bat, but, while he is running, what I do ???

                                1 Reply Last reply
                                0
                                • G Offline
                                  G Offline
                                  goetz
                                  wrote on last edited by
                                  #16

                                  call configure.exe of the Qt sources with the appropriate options an run mingw32-make.

                                  Oh, and I should mention that you have to unpack the Qt sources first, otherwise there will be no configure.exe....

                                  http://www.catb.org/~esr/faqs/smart-questions.html

                                  1 Reply Last reply
                                  0
                                  • T Offline
                                    T Offline
                                    tifil
                                    wrote on last edited by
                                    #17

                                    Ok, I'll run the configure.exe.

                                    PS: Thanks a lot for your help.

                                    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