From QT-COM Create IDL from DLL.
-
Expeted : Need to generate IDL file for DLL Library.
We have created a Qt Application and its output is exe, When we run idc to genrate idl from the exe it genrates properly.
- We have created a DLL project.
- Building the project it properly builds and generates the dll.
- If we try to generate idl from the dll using IDC, it fails and throws the error as shown below.
Couldn't resolve 'DumpIDL' symbol in C:...\Debug\SubClass.dll
Class has no metaobject information (error in C:...\Debug\SubClass.dll)!Our Dll project created from QT and converted to MSVC
QT CMD : idc.exe "SubClass.dll" -idl "SubClass.idl" -version 1.0
SubClass.H
#include <atlbase.h>
#include <atlsafe.h>
#include <qobject.h>
#include <qstring.h>using namespace std;
class SWISubClass : public QObject, public QAxBindable
{
Q_OBJECTQAXFACTORY_DEFAULT(SWISubClass, "{xxxxx-xxxxx-xxxxx-xxxxx}", "{xxxxx-xxxxx-xxxxx-xxxxx}", "{xxxxx-xxxxx-xxxxx-xxxxx}", "{xxxxx-xxxxx-xxxxx-xxxxx}", "{xxxxx-xxxxx-xxxxx-xxxxx}")
public:
explicit SubClass(QObject* parent = nullptr);
~SubClass();public Q_SLOTS:
bool OpenProject(QString projectPath);};
SubClass.CPP
#pragma once
#include "SubClass.h"
using namespace std;SubClass::SubClass(QObject *obj) : QObject(obj) {}
SubClass::~SubClass(){}
bool SubClass::OpenProject(QString projectPath){return true;}
-
Expeted : Need to generate IDL file for DLL Library.
We have created a Qt Application and its output is exe, When we run idc to genrate idl from the exe it genrates properly.
- We have created a DLL project.
- Building the project it properly builds and generates the dll.
- If we try to generate idl from the dll using IDC, it fails and throws the error as shown below.
Couldn't resolve 'DumpIDL' symbol in C:...\Debug\SubClass.dll
Class has no metaobject information (error in C:...\Debug\SubClass.dll)!Our Dll project created from QT and converted to MSVC
QT CMD : idc.exe "SubClass.dll" -idl "SubClass.idl" -version 1.0
SubClass.H
#include <atlbase.h>
#include <atlsafe.h>
#include <qobject.h>
#include <qstring.h>using namespace std;
class SWISubClass : public QObject, public QAxBindable
{
Q_OBJECTQAXFACTORY_DEFAULT(SWISubClass, "{xxxxx-xxxxx-xxxxx-xxxxx}", "{xxxxx-xxxxx-xxxxx-xxxxx}", "{xxxxx-xxxxx-xxxxx-xxxxx}", "{xxxxx-xxxxx-xxxxx-xxxxx}", "{xxxxx-xxxxx-xxxxx-xxxxx}")
public:
explicit SubClass(QObject* parent = nullptr);
~SubClass();public Q_SLOTS:
bool OpenProject(QString projectPath);};
SubClass.CPP
#pragma once
#include "SubClass.h"
using namespace std;SubClass::SubClass(QObject *obj) : QObject(obj) {}
SubClass::~SubClass(){}
bool SubClass::OpenProject(QString projectPath){return true;}
-
J jsulm moved this topic from Jobs on
-
@Madhura
Hello and welcome.I suggest you post questions about code in the General and Desktop forum, not the Jobs forum, which is for advertising/requesting jobs.
-
@Madhura
Hello and welcome.I suggest you post questions about code in the General and Desktop forum, not the Jobs forum, which is for advertising/requesting jobs.
Already the def is present with DumpIDL data still we are facing this same issue
-
Already the def is present with DumpIDL data still we are facing this same issue
-
Hi, to make sure the DumpIDL symbol is present in the .dll, open a MSVC2017 CMD window:
dumpbin /exports "C:\Users\....\QtComSupportDll.dll"
DumpIDL should be seen..
Also the Qt examples like ActiveQt simple, it's an .exe not a .dll but it also uses a .DEF file to include the DumpIDL symbol. If you build it, does idc.exe work on it?