I have a Windows 7 64bit system with the latest MinGW (32bit) installed along with the Qt 5.5 SDK (again 32bit) which also ships with its own MinGW. Due to the fact that I'm not the only one using the system I can't remove the standalone MinGW.
My project is using qmake
and is a plain C project (not C++). Everything builds fine but when I try to execute my binary in the command line I get that the application was unable to start due to a missing libgcc_s_dw2-1.dll
on the system.
After looking into the issue I found that both the standalone MinGW and the one shipped alongside the Qt SDK have the mentioned DLL.
- Standalone MinGW -
libgcc_s_dw2-1.dll
is located inside thebin
subdirectory of the MinGW installation where the binaries are located (gcc
,g++
,gdb
etc.) - Qt MinGW -
libgcc_s_dw2-1.dll
is located insideC:\Qt\Tools\mingw492_32\i686-w64-mingw32\lib
subdirectory while the MinGW components' binaries are insideC:\Qt\Tools\mingw492_32\i686-w64-mingw32\bin
.
I would like to know how to properly set my PATH
variable so that:
- The application starts properly
- No conflicts with the standalone MinGW installation occur
Just a side-note: I've already checked other posts here on SO but was unable to find a solution (perhaps I've missed it). I have also tried LIBS += -static
but the result is the same.