Building in static mode.
-
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 -1So I can't build in static mode, then is there any solution ???
Thanks a lot.
-
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.
-
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 2What is it ???
-
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.
-
I have downloaded it yet, before the MinGW environment.
When I had the first error, I already installed it. (your link)
-
Sorry, I don't understand what you did.
-
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 -
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.
-
Ok, so where can I download a complete MinGW environment ???
-
Why not try your favorite search engine and ask for "mingw":http://lmgtfy.com/?q=mingw?
-
I downloaded this :
http://www.mingw.org/wiki/InstallationHOWTOforMinGW
But, you told me that he is not correct
-
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.
-
Yes, I downloaded them.
But, in the .bat, what I put ???
-
The .bat already exists. You are supposed to execute it. The actual path may differ, depending on where you installed MinGW.
-
Yes, I have the .bat, but, while he is running, what I do ???
-
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....
-
Ok, I'll run the configure.exe.
PS: Thanks a lot for your help.