Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Dumpcpp-generated code of sldworks.tlb compile errors

Dumpcpp-generated code of sldworks.tlb compile errors

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 1 Posters 4.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    phoniexhao
    wrote on last edited by
    #1

    Sorry for my poor English.

    1. Environment: Win7 32-bit, Visual Studio 2008, Qt 4.7.3(OpenSource Edition)

    2. 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 &)'
      @

    3. 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
    @

    1. the main.cpp is:
      @#include <QApplication>
      #include "solidworks.h"

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);
    return app.exec();
    }
    @

    1. 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

    2. Did I do any thing wrong?

    Thank you.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      phoniexhao
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved