Dear Qt friends/developers,
I know this has been discussed again and again and indeed I read the f* manual already. I did a static built of my Qt 5.1.1 installation according to the documentation at
http://qt-project.org/doc/qt-5.1/qtdoc/deployment-windows.html
The compilation was successful, however my application still doesn’t get linked statically to the Qt libraries, although the linker flags clearly state “-static -static-libgcc”.
I checked the directory structure in my Qt installation and was wondering about the location of different libraries. Right after the installation of the Qt SDK I have 77 libraries (*.a) in the folder
<SOME_PATH>\Qt5\5.1.1\mingw48_32\lib
When I built Qt statically I get 27 libraries (*.a) in the folder:
<SOME_PATH>\Qt5\5.1.1\Src\qtbase\lib
I added the following two lines in my project file:
QMAKE_LFLAGS += -static -static-libgcc
CONFIG += static
However, when it comes to linking my application, I can still see that Qt Creator tries to link against the libraries found in the “mingw48_32/lib” directory rather than the newly built ones in “Src\qtbase\lib”.
-LC:\Programme_x86\Qt5\5.1.1\mingw48_32\lib -lQt5Multimedia -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Core
I would appreciate if anybody could shed some light on this.
Thanks in advance,
Markus
PS.: I know the license implications for static linking.
↧