Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, July 2007
Compiling Qt apps statically (Qt/Windows)


Message 1 in thread

Hello, I`m trying to compile my application statically so I don't need to
ship the Qt dlls with my executable (which is actually supposed to work only
on Windows for now), but I can't build it statically. I'm currently using Qt
Open Source Edition for Windows and Qt Eclipse Integration.

On my Qt/lib folder there are a lot of .a files, so I guess qt has been
built correctly.

But I can't generate a makefile (or a .pro file) that will be statically
built instead of dinamically and my release executable has less than 100KB.

Thanks in advance.

-- 
 [ signature omitted ] 

Message 2 in thread

You have to recompile QT.

Re-run configure.exe, adding "-static" switch to it

Then rerun make to recompile qt.

Then QT will be compiled as static library. No need to alter the .pro
files afterwards, just do "make clean && make" and your app should be
static.

Martin Petricek

On 7/20/07, Thiago Sfredo <thiagosfredo@xxxxxxxxx> wrote:
> Hello, I`m trying to compile my application statically so I don't need to
> ship the Qt dlls with my executable (which is actually supposed to work only
> on Windows for now), but I can't build it statically. I'm currently using Qt
> Open Source Edition for Windows and Qt Eclipse Integration.
>
> On my Qt/lib folder there are a lot of .a files, so I guess qt has been
> built correctly.
>
> But I can't generate a makefile (or a .pro file) that will be statically
> built instead of dinamically and my release executable has less than 100KB.
>
> Thanks in advance.
>
> --
> Thiago Sfredo

--
 [ signature omitted ]