This mingw contains gcc 4.6.3, with name - i686-w64-mingw32.
On Windows, a Qt\'s.pro file w.r.t a hello wor
As seen in this merge request there is a bug in the qmake.conf file which configures the variables used whenever you use the default configuration of qmake.
The option -enable-stdcall-fixup needs to be prefixed with a -Wl, in order to get parsed correctly by mingw32-g++ because -e... will be split into -e ... when parsed. This prefix simply means "do not parse the following as -e nable-stdcall-fixup but as -enable-stdcall-fixup".
The qmake.conf file contains -Wl but in a wrong line, hence the merge request, which says
the leading "-Wl," was apparently accidentally split off to the wrong line.
The patch moves the -Wl one line up. You can do this manually on your qmake.conf file, which should be located under the Qt installation under mkspecs/win32-g++/qmake.conf. Change the following lines:
QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl
Into this:
QMAKE_LFLAGS = -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
Note that there should be no space between -Wl, and -enable-stdcall-fixup. It should be passed as one single argument to g++ in order to achieve what we want.