[Qt-interest] Static compilation disaster (Windows)

Mark Brand mabrand at mabrand.nl
Sat Nov 20 09:48:31 CET 2010



> Hi.  Posted this in a forum at Qt-Centre but got no love.  So, here we 
> are.
>
> Trying to compile a program for Windows that doesn't need DLLs or the 
> Qt framework.
>
> I followed this guide
> http://www.formortals.com/build-qt-static-small-microsoft-intel-gcc-compiler/
>
> The only point of interest in the above is Step 3.  I cannot find 
> mingwvars.bat on my machine. :/  Does that matter?  Outdated guide?
>
> Anyways... I continued on, and things seemed to be peachy.  I 
> configured Qt w/ the -static option and built it.
>
> In my project file I added
> CONFIG += static
>
> And compiled.  I got a nice 10Mb file which ran find on my machine.  
> However, someone w/o the Qt Framework installed on both a 32-bit and 
> 64-bit box tried it and got two different errors.
>
> (Note, these are translated from German in English)
>
> 64-bit
> This version of the file is not compatible with your Windows-version. 
> Open the systeminformation of the computer to check whether a x86-(32 
> Bit)- or x64 (64 Bit)-version of the program is required, and then 
> contact the publisher of the software afterwards
>
> 32-bit:
> Program ist too big for the working memory
>
> If anyone wants to take a gander, here's the project:
> https://sourceforge.net/projects/tagitdown/
>
> tagitdown_0.7_win32.exe is the offending file.  I will be able to try 
> it on a Qt-less machine when I get home, but I'm expecting the same 
> results.

Hi Paul,

"Mingw-cross-env" is a complete building environment that includes Qt 
and builds static everything:

http://mingw-cross-env.nongnu.org/

Mark



More information about the Qt-interest-old mailing list