Creating small executables with Qt Creator and MingW
Starting with an empty Plain C Project in Qt Creator IDE and gcc from MinGW as compiler, I will show you how to generate small binaries that are independent from MinGW dlls. At the writing of this article the app versions that I used were Qt Creator 2.6.2 with Qt 5.0.1 and gcc 4.7.2.
Replace the code of the main.c with following:
#include <windows.h> void main() { MessageBoxA(0, "Hello", "world!", MB_OK); ExitProcess(0); } Switch the build configuration in menu Projects from Debug to Release and compile the project (Ctrl + B is the default shortcut for this).