Important: Please read the Qt Code of Conduct -

Using COM object with MinGW 4.8

  • 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")
    message("Component is not found!")
    REQUIRES += Component

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

    Any advice?

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


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

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

  • 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
        IZoiperScript(IDispatch *subobject = 0, QAxObject *parent = 0)
            : QAxObject((IUnknown*)subobject, parent)

    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)

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

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


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


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

    But it still complains about the QAxObject constructor

Log in to reply