I create a simple console application "Hello world". First, I compile it with qmake: hello.pro
QT += core QT -= gui CONFIG += c++11 TARGET = hello CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp The application is builded normally and on a system without installed Qt and MinGW work fine. The size of the executable is 3.58MB.
Next, we compile the same source code using the QBS build system. Hello.qbs:
import qbs CppApplication { Depends{ name: "Qt" submodules: [ "core", ] } name: "HelloWorld-minimal" files: "main.cpp" } The executable file size is 4.35MB. The application requires "libwinthread-1.dll", "libstdc ++ - 6.dll" and "libgcc_s_dw2-1.dll".
A question: how correctly to build a static application in QBS with static linking of the above libraries and so that the size of the executable file was the same?
(With the standard build of the project, without statics, the sizes of executable files with Qmake and with Qbs are the same).