PDA

View Full Version : Static qt building



karlkar
5th August 2013, 19:10
Hello!
I have prepared static build of Qt. It works great, my apps doesn't need Qt5Gui.dll and so on. But it still needs libwinpthread-1.dll, libstdc++-6.dll and libgcc_s_sjlj-1.dll. What can I do to include them in my build?
I have Windows 7 x64, mingw47_32. I use QtCreator 2.7.0 to build binaries.
I've read that I need to add -static-libgcc to build with libgcc_s_sjlj-1.dll, but where do I have to put this?

ChrisW67
5th August 2013, 23:36
I've read that I need to add -static-libgcc to build with libgcc_s_sjlj-1.dll, but where do I have to put this?
This is an inconsistent request. If you want to statically link libgcc then you are specifically avoiding libgcc's dynamically linked libraries (DLLs).

It looks like you want to build your static Qt library with modified options so that it, and the projects it subsequently generates, statically link the GCC libs.
How to build a static Qt version for Windows with GCC (http://qt-project.org/wiki/How_to_build_a_static_Qt_version_for_Windows_with_ gcc)
Having never tried it myself I cannot vouch for the directions... (I don't see the endless attraction that static builds seem to hold.)