[Qt-interest] Static compilation disaster (Windows)
Andreas Pakulat
apaku at gmx.de
Fri Nov 19 16:07:04 CET 2010
On 19.11.10 22:14:34, Paul England wrote:
> 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.
I'm just getting an error that libgcc_s_dw2-1.dll is missing which the
executable links against. And thats true, I don't have mingw installed here
and hence there's no such dll. I have no idea wether this is mingw
specific, but there's also libstdc++6 linked in which probably comes from
mingw too. If you want static binaries that don't depend on anything else
except MS standard libs, then maybe try building with the MS compile
toolchain instead. Even then though you'll have to link dynamically against
the MS runtime library, which means your users may need to install the
apropriate runtime package from MS before they can run your app.
Andreas
--
Your love life will be... interesting.
More information about the Qt-interest-old
mailing list