[Qt-interest] Qt 4.5.2 Problem with static library gui.a creation

Sam Simon oboy86 at windowslive.com
Thu Aug 20 15:16:32 CEST 2009


Hello.

I have a project which consists of a model project and gui project.
I would like to have a statically build archive file gui.a that does not have any dependences to qt.

The
file gui.a could be included in the compilation of the model project
and at this stage no qt development tools are needed. gui.a should have
all the gui binary code needed inside it.


I have compiled qt statically and I am able to make static projects using:
qmake -project
qmake
make
And as a result a HelloWorld program's size is about 11 MB.
So, no problems with that.

However, when trying to make a static lib my pro-file is like this:

TEMPLATE = lib
CONFIG += staticlib
TARGET = gui
DEPENDPATH += .
INCLUDEPATH += .

# Input
HEADERS += constants.h \ ... ... ...
SOURCES += main.cpp \ ... ... ...

As
a result, I get file gui.a which size is only 48 KB. So it doesn't have
qt libraries statically inside it. It doesn't link qt libraries when
creating the gui.a file. Why?


I would like to have an independent gui.a file which size would be approximately 15 MB.
What modifications should I make for the *.pro -file?

Yours thankfully,
Sam

_________________________________________________________________
Windows Liven avulla voit jakaa valokuviasi helposti.
http://www.download.live.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090820/f9f3dfcc/attachment.html 


More information about the Qt-interest-old mailing list