Missing libgcc_s_dw2-1.dll
<p>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.</p>

<p>My project is using <code>qmake</code> and is a <strong>plain C project</strong> (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 <code>libgcc_s_dw2-1.dll</code> on the system.</p>

<p>After looking into the issue I found that both the standalone MinGW and the one shipped alongside the Qt SDK have the mentioned DLL.</p>

<ul>
<li><strong>Standalone MinGW</strong> - <code>libgcc_s_dw2-1.dll</code> is located inside the <code>bin</code> subdirectory of the MinGW installation where the binaries are located (<code>gcc</code>, <code>g++</code>, <code>gdb</code> etc.)</li>
<li><strong>Qt MinGW</strong> - <code>libgcc_s_dw2-1.dll</code> is located inside <code>C:\Qt\Tools\mingw492_32\i686-w64-mingw32\lib</code> subdirectory while the MinGW components' binaries are inside <code>C:\Qt\Tools\mingw492_32\i686-w64-mingw32\bin</code>.</li>
</ul>

<p>I would like to know how to properly set my <code>PATH</code> variable so that:</p>

<ul>
<li>The application starts properly</li>
<li>No conflicts with the standalone MinGW installation occur</li>
</ul>

<p>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 <code>LIBS += -static</code> but the result is the same.</p>