Qt编译,imp_CommandLineToArgvW@8问题

Tested msvc2013. The linker can not find _imp_CommandLineToArgvW@8. It's in shell32.lib. I see qtmain.lib use the function CommandLineToArgvW, and winmain.pro add -lshell32 flag. But qtmain.lib is a static lib, so that flag does nothing i think. I change a line in mkspecs/win32-msvc2013/qmake.conf
QMAKE_LIBS_QT_ENTRY = -lqtmain
to
QMAKE_LIBS_QT_ENTRY = -lqtmain -lshell32
and it works

修改mkspecs/win32-msvc2013(对应的vs版本)/qmake.conf
找到
QMAKE_LIBS_QT_ENTRY = -lqtmain
修改为
QMAKE_LIBS_QT_ENTRY = -lqtmain -lshell32

参考:https://bugreports.qt.io/browse/QTBUG-44862

posted @ 2016-02-04 14:57  北山愚公*  阅读(1070)  评论(0编辑  收藏  举报