How can I remove the dependencies for mingwm10.dll and ligcc_s_dw2-1.dll?Should I do static linking?Is it possible to do static linking with Qt Creator?
How can I do static linking?(step by step please)
How can I remove the dependencies for mingwm10.dll and ligcc_s_dw2-1.dll?Should I do static linking?Is it possible to do static linking with Qt Creator?
How can I do static linking?(step by step please)
Try adding the -static-libgcc linker option.
How can I do this?I compile with Qt Creator and don't know how I can compile,link without using Qt Creator.
You can still use Qt Creator, just put the option in your .pro file like so:
Qt Code:
win32 { QMAKE_LFLAGS += -static-libgcc }To copy to clipboard, switch view to plain text mode
Awareness (11th April 2010)
Thank you very much
Can we do that with the LGPL license?
Lawand (3rd December 2010)
That would depend on the licenses of MinGW and libGCC, as they are not Qt related.
I couldn't make it work.
My project's .pro file is:
qmake Code:
QT -= core gui TARGET = struct1 Win32 { QMAKE_LFLAGS_RELEASE += -static-libgcc } CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cppTo copy to clipboard, switch view to plain text mode
but it still requires mingwm10.dll.
Last edited by wysota; 13th April 2010 at 13:21. Reason: reformatted to look better
You need mingwm10.dll because of the thread module.
I didn't find how to remove the thread module from the pro file but if you manually remove every occurrence of "-mthreads" in makefiles, it won't complain anymore about mingwm10.dll .
The problem is that you can not use QThread object in this case.
Awareness (18th April 2010)
Thanks for your answer.Is it not possible to make this mingwm10.dll file staticaly linked?
Compile statical qt, first edit %qtdir%\mkspecs\win32-g++\qmake.conf and change
then recompile usingQt Code:
QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc QMAKE_LFLAGS = -static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-relocTo copy to clipboard, switch view to plain text mode
important here is no-exceptions that tells to link mingwm10.dll. This command compile qt in release mode, add -debug if you want that to. Also properly set Path on windows env. That way everything works fine, assuming configure is success.Qt Code:
cd %qtdir% configure -static -release -no-exceptions -[other parameters like -mmx -sse -sse2 -3dnow etc...] make sub-srcTo copy to clipboard, switch view to plain text mode
Your project is then LGPL, that means if some one who buy/download your app ask you for sorce code you need to provide it to them. I don't know if mingw allso gave you some restriction, from license point of view.
Last edited by Talei; 18th April 2010 at 22:52.
There doesn't seem to be a static version of MinGW. You can get around the problem with a bit of messing about, but by far the easist way is to change compilers. You can download the free edition of Microsoft's Visual C++ for example.
Bookmarks