Dumpcpp-generated code of sldworks.tlb compile errors
-
Sorry for my poor English.
-
Environment: Win7 32-bit, Visual Studio 2008, Qt 4.7.3(OpenSource Edition)
-
I use command "dumpcpp sldworks.tlb -n SolidWorks" generated the code, no errors. But when I compile it, the errors are follow:
@1>d:\programs\qt4.7.3\include\activeqt../../src/activeqt/container/qaxobject.h(77) : error C2248: 'QObject::QObject' : cannot access private member declared in class 'QObject'
1> d:\programs\qt4.7.3\include\qtcore../../src/corelib/kernel/qobject.h(309) : see declaration of 'QObject::QObject'
1> d:\programs\qt4.7.3\include\qtcore../../src/corelib/kernel/qobject.h(122) : see declaration of 'QObject'
1> This diagnostic occurred in the compiler generated function 'QAxObject::QAxObject(const QAxObject &)'
@ -
the .pro file is:
@
TYPELIBS = $$system(dumpcpp SldWorks.tlb -n SolidWorks -nometaobject)
SOURCES = main.cpp
======== Convenient config ===============
CONFIG += qaxcontainer
CONFIG (debug, debug|release):CONFIG += console
@- the main.cpp is:
@#include <QApplication>
#include "solidworks.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
return app.exec();
}
@-
Want to get sldworks.tlb? following the link: https://cncdl2.kanbox.com/gcid2?gcid=8C08A6C1898C40B816F4B18D896A0C81F50504A6&fn=sldworks.rar&userid=409420018&sessionid=F9BFD2ADE6424C04854C2CAA9A683B1D , using right click > save as
-
Did I do any thing wrong?
Thank you.
-
-
I found the reason!
For some simple interface, as IEnumCurves, dumpcpp just generate it's code like this:
@
// stub for vtable-only interface
class IEnumCurves : public QAxObject {};
@
And dumpcpp dosen't generate the corresponding qMetaTypeConstructHelper() function.But the compiler need every interface/coclass's qMetaTypeConstructHelper() function.
WTF.