I am trying to build a standalone Qt app without any DLLs needed. I recompiled Qt 5.4.1 statically. When I compile and run an application, it doesn't require any Qt DLLs, but it requires libgcc_s_dw2-1.dll instead. I have also edited my mkspecs before configuring and building Qt, I edited these values:
QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport -static -static-libgcc
QMAKE_CXXFLAGS = -pipe -fno-keep-inline-dllexport -static -static-libgcc -static-libstdc++
(added -static -static-libstdc++ and -static-libgcc)
I also added a QMAKESPECS environment variable. When I build something using Qt, I can always see this options in the output, so I am sure that the mkspecs are applying. When I build a non-Qt program with these options (-static -static-libgcc -static-libstdc++), it doesn't need any DLLs when I run it.
Can somebody help me? I use Qt 5.4.1 and MinGW-w64 4.9.2
libgcc_s_dw2-1.dll
thus it is most likely that either your main executable or some external dll did not pick up this flag. Can you use a tool like dependency walker to see which dll/executable exactly depends on this dll? – Rudolfs Bundulis