Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.9.1
Description
I static complied Qt 5.9.1 under msvc-2017 x86.
//代码占位符 Configure -qt-libjpeg -qt-zlib -qt-libpng -qt-libjpeg -nomake examples -nomake tests -skip webkit -no-openssl -skip multimedia -skip qt3d -no-dbus -platform win32-msvc2017 -opensource -confirm-license -mp -no-warnings-are-errors -static
also, I change QT make file from /MD(d) to /MT(d).
//代码占位符 [cc lang="make"] QMAKE_CFLAGS_RELEASE = -O2 -MT -GL QMAKE_CFLAGS_DEBUG = -Zi -MTd QMAKE_LFLAGS_RELEASE =/INCREMENTAL:NO /LTCG /NODEFAULTLIB:libc.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib QMAKE_LFLAGS_DEBUG =/DEBUG /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:msvcrtd.lib [/cc]
then try to use QtQuick.Controls.
//代码占位符 import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Controls 1.5 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") TreeView{} }
then get error:
//代码占位符 qrc:/main.qml:5 module "QtQuick.Controls" plugin "qtquickcontrolsplugin" not found
using Q_IMPORT_PLUGIN(QtQuickControlsPlugin) macro ,I get linking error:
//代码占位符 main.obj : error LNK2001: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_QtQuickControlsPlugin(void)" (?qt_static_plugin_QtQuickControlsPlugin@@YA?BUQStaticPlugin@@XZ)
I am sure the QML_IMPORT_PATH is correct, and qtquickcontrolsplugin.lib, qtquickcontrolsplugin.dll file exists.
also, I notice the QtQuick.Controls.Material component has the same problem.