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

岁酱吖の 提交于 2019-11-29 14:34:05

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!