Program throws issue "Failed to extract plugin meta data from .dll"
-
wrote on 16 Aug 2021, 05:42 last edited by
hi, when I use visual studio to remote debug on windows 10, the program throws the issue "Failed to extract plugin meta data from .dll". These dll are created based on the application. The Qt version is 5.12.11.
The head file of plugin is below:class pGen12Control : public InterfaceControl { Q_OBJECT #if QT_VERSION >= 0x050000 Q_PLUGIN_METADATA(IID InterfaceControl_iid FILE "pGen12Control.json") #endif // QT_VERSION >= 0x050000 Q_INTERFACES(InterfaceControl) FORCE_NOT_ABSTRACT(pGen12Control)
And the head file of "InterfaceControl" is below:
class InterfaceControl : public QObject, public InterfaceGlobal { public: InterfaceControl() : InterfaceGlobal(LIB_ID_CONTROL_UNKNOWN) { } InterfaceControl(quint16 plugID) : InterfaceGlobal(plugID) { } virtual ~InterfaceControl() {} virtual InterfaceControl * newUniqueInstance() const = 0; //virtual QString echo(const QString &message) = 0; // Example Function signals: virtual void sendBusMessage(const so_Message & payload) = 0; private slots: virtual void recvBusMessage(const so_Message & payload) = 0; }; #define InterfaceControl_iid "hil.tooling.control" Q_DECLARE_INTERFACE(InterfaceControl, InterfaceControl_iid)
The call code to pluginloader function is below:
QString filepath = pluginsDir.absoluteFilePath(fileName); QPluginLoader *pluginLoader = new QPluginLoader(filepath); logging::log(logging::log_level::INFO, pluginLoader->errorString());
The value of "fileName" and "filepath" are right.
Appreciate your advice.
-
Hi and welcome to devnet,
@patricxian said in Program throws issue "Failed to extract plugin meta data from .dll":
These dll are created based on the application.
What do you mean by that ?
-
Hi and welcome to devnet,
@patricxian said in Program throws issue "Failed to extract plugin meta data from .dll":
These dll are created based on the application.
What do you mean by that ?
wrote on 18 Aug 2021, 01:40 last edited by@SGaist said in Program throws issue "Failed to extract plugin meta data from .dll":
What do you mean by that ?
The plugin is created by myself, not belong to Qt library.
-
wrote on 18 Aug 2021, 05:41 last edited by
I solve the problem. The issue is caused by the dll version.
-
Your dll version ?
1/5