Application Static Linking
Version: Qt 5.1 - Win64 binary package
How to direct qmake to link an application against the static version of a Qt library (when both versions are included in a Win64 package) ?
Thanks, in advance, for your help.
None of the binary distributions include a static version of Qt. If you have not built Qt for yourself then you do not have a static Qt.
Once you have a static Qt library build then you use the qmake from that library build to process your pro file. The resulting program will be linked against the static Qt library.
Thank you for your answer.
Now, what' s the purpose of the object file libraries residing in the package' s "lib" directory ?
[quote author="Asm_x64" date="1373603748"]
Now, what' s the purpose of the object file libraries residing in the package' s "lib" directory ?[/quote]
You mean the "import library" such as Qt5Core.lib ?
The import libraries are need by MSVC when you want to link to shared libraries such as Qt5Core.dll.
*.lib is used in link time, while *.dll is used in running time.
In order word, you application can be compiled successfully even when the *.dll doesn't exist.
BTW, the term "import library" doesn't exist in GCC world. MinGW can work with or without the "import library" .
My question was stupid. Sorry.
However, Windows 7 labels both archives and import libraries as "Object File Library", which can be misleading if you jump to conclusions as I did.
Thanks for your reply.