PDA

View Full Version : Qt Strange size!



Peppy
7th October 2010, 19:51
I have compiled small exe just few kB ( GUI + CORE ) and It requires QtCored4.dll QtGuid4.dll ?! It has 177 MB ! I have Qt 4.7 And code is in main.cpp



#include <QtGui/QApplication>
#include <QMessageBox>
#include <QLibrary>

int main(int argc, char *argv[])
{
QApplication Studio(argc, argv);

if(QLibrary::isLibrary("Studio.Core")) {
//...
} else {
//...
}

return Studio.exec();
}


Why? I remember that it was using QtCore4.dll and QtGui4.dll (33MB) I used CONFIG += static but still nothing...

Zlatomir
7th October 2010, 19:54
You should build the Release version which will need QtCore4.dll QtGui4.dll (without d) and this two have ~12mb.

Peppy
7th October 2010, 19:57
So If I have Debug, it requires full libs, If Release then this "stripped" files ?? I am right ?

Zlatomir
7th October 2010, 20:02
No, the release are "full" too

The debug versions are bigger because they have much more "debugging" information, so that they are easier to debug, you use the debug version on your computer to test and find bugs, and the release build when you send the application to your clients.

And the release executable is optimized for better performance.