Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Using COM object with MinGW 4.8
Forum Updated to NodeBB v4.3 + New Features

Using COM object with MinGW 4.8

Scheduled Pinned Locked Moved Unsolved 3rd Party Software
6 Posts 2 Posters 1.9k Views 2 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.
  • G Offline
    G Offline
    gkavrecic
    wrote on last edited by
    #1

    Hi
    I'm trying to use an external COM object with MinGW 4.8.

    I used dumpcpp to generate *.h & *.cpp file.
    But it returns an empty result when I want to get the *.tlb file.
    I've tried with GUID & EXE name.

    The *.pro file contains:
    TYPELIBS = $$system(dumpcpp.exe --getfile "ext_prog.exe")
    isEmpty(TYPELIBS){
    message("Component is not found!")
    REQUIRES += Component
    }

    The compiler returns:
    "Some of the required modules (Component) are not available."
    "Skipped."

    Any advice?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      karlheinzreichel
      wrote on last edited by karlheinzreichel
      #2

      you have to pull all of the necessary dlls of ext_prog.exe in your path, (e.g. the Qt libraries)
      as dumpcpp will try to execute the ext_prog.exe during the generation of the tlb file.

      regards
      Karl-Heinz

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gkavrecic
        wrote on last edited by
        #3

        I find it strange that dumpcpp does not report any error.
        neither it generates any output

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gkavrecic
          wrote on last edited by
          #4

          I've also tried to run dumpcpp in the install folder of the program.
          The program is not a secret, just wanted to make it generic.
          It is Zoiper.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gkavrecic
            wrote on last edited by gkavrecic
            #5

            I 've made a step forward using a different GUID.
            It actually returned the Zoiper.EXE itself.

            Now, I'm stuck compiling QAxObject descendants - e.g. IZoiperScript class (the first in *.h file)

            zoiperapi.h:281: error: no matching function for call to 'QAxObject::QAxObject(ZoiperAPI::IUnknown*, QAxObject*&)'
            

            from zoiperapi.h:

            class ZOIPERAPI_EXPORT IZoiperScript : public QAxObject
            {
            public:
                IZoiperScript(IDispatch *subobject = 0, QAxObject *parent = 0)
                    : QAxObject((IUnknown*)subobject, parent)
                {
                    internalRelease();
                }
            ...
            }
            

            QAxObject is defined as:

            class QAxObject : public QObject, public QAxBase
            {
                QAxObject(QObject *parent = 0);
                QAxObject(const QString &c, QObject *parent = 0);
                QAxObject(IUnknown *iface, QObject *parent = 0);
            ...
            }
            

            As QAxObject is a descendant of QObject this should not be a problem. Or miss something?

            It might that the problem is caused because I've used dumpcpp from Qt 5.9? (I'm compiling with 4.8)

            1 Reply Last reply
            0
            • G Offline
              G Offline
              gkavrecic
              wrote on last edited by
              #6

              I've tried compiling with Qt 5.9, but it returns the same error.

              Additionally, I had to modify the generated zoiperapi.h file:

              from:

              #include <qaxobject.h>
              #include <qaxwidget.h>
              

              to:

              #include <ActiveQt/QAxBase>
              #include <ActiveQt/QAxObject>
              

              But it still complains about the QAxObject constructor

              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