warning: cannot find entry symbol nable-stdcall-fixup; defaulting

前端 未结 1 1247
孤独总比滥情好
孤独总比滥情好 2020-12-21 03:39

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

相关标签:
1条回答
  • 2020-12-21 04:15

    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.

    0 讨论(0)
提交回复
热议问题