我在项目中使用了外部dll文件,现在将我的QT版本从Qt5.5.1升级到了5.10.1。 现在我在使用dll文件时遇到了问题。
我已经从Qt5.5.1二进制文件和Qt5.10.1二进制文件运行qmlplugindump.exe:
qmlplugindump com.IO.Plugin 1.0 C:\...\com\IO\Plugin
Qt5.5.1:[作品]
import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
// 'qmlplugindump com.IO.Plugin 1.0 C:\Qt\Qt5.10.1\5.10.1\mingw53_32\qml\com\IO\Plugin'
Module {
dependencies: []
Component {
... }
Qt5.10.1:[不起作用]
QQmlComponent: Component is not ready
file:///C:/Qt/Qt5.10.1/5.10.1/mingw53_32/qml/com/IO/Plugin/qmldir: plugin cannot be loaded for module "": Cannot load library C:\Qt\Qt5.10.1\5.10.1\mingw53_32\qml\com\IO\Plugin\IOPlugin.dll: Das angegebene Modul wurde nicht gefunden.
Qt5.7.0:[什么都没用(添加到问题27-Aug-2018)]
This plugin does not support createPlatformOpenGLContext!
QQmlComponent: Component is not ready
file:///C:/Qt/Qt5.10.1/5.10.1/mingw53_32/qml/com/IO/Plugin/typelist.qml:2:1: plugin cannot be loaded for module "com.IO.Plugin": Cannot load library C:\Qt\Qt5.7.0\5.7\mingw53_32\qml\com\IO\Plugin\IOPlugin.dll: Das angegebene Modul wurde nicht gefunden.
使用Qt5.5.1-qmlplugindump创建plugins.qmltypes文件会导致Qt5.10.1识别插件而不用红色下划线显示已知的QML组件,但在编译项目时仍会产生以下错误:
plugin cannot be loaded for module "com.IO.Plugin": Die Bibliothek C:\...\release\com\IO\Plugin\IOPlugin.dll kann nicht geladen werden: Das angegebene Modul wurde nicht gefunden. [Translated: can not be loaded: The modul can not be found]
QQmlComponent: Component is not ready