Qt4.8.0 QAxObject error but 4.7.4 is OK.



  • When I build a project using QAxObject with QT4.8.0.
    cannot find -IQAxContainerd
    collect2:Id returned 1 exit status

    but if I use QT4.7.4, it works well.
    QT creator 2.4.0 + Qt libraries 4.8.0 for Windows (minGW 4.4, 354 MB)------error
    QT creator 2.4.0 + Qt libraries 4.7.4 for Windows ---------------------------OK
    OS: Windows7 enterprise
    WindowsXP
    Any one knows what's wrong with it.



  • QAxContainer is not pre-built. Build the activeqt project located at

    path-to-qt/4.8.0\src\activeqt

    then take libQAxContainerd.a and copy it to 4.8.0\lib.

    BTW, make sure you are using Qt for msvs; I couldn't get a
    successful build using MinGW.



  • Hi, here's what I had to do to get QAxObject back to functional after upgrading the Qt SDK suite (Qt Creator 2.0.1, Qt 4.7.0 to Qt Creator 2.4.1, Qt 4.8.0), with MinGw, without msvs.

    Starting from a standard Qt SDK installation (./ is the Qt SDK install directory)

    1 - Changed the include paths in the following .h files, as there were "file not found" complaints when compiling:

    in ./Desktop/Qt/4.8.0/mingw/include/ActiveQt/qaxbase.h

    //#include "../../src/activeqt/container/qaxbase.h"
    #include "../../QtSources/4.8.0/src/activeqt/container/qaxbase.h"

    in ./Desktop/Qt/4.8.0/mingw/include/ActiveQt/qaxwidget.h

    //#include "../../src/activeqt/container/qaxwidget.h"
    #include "../../QtSources/4.8.0/src/activeqt/container/qaxwidget.h"

    in ./Desktop/Qt/4.8.0/mingw/include/ActiveQt/qaxfactory.h

    //#include "../../src/activeqt/control/qaxfactory.h"
    #include "../../QtSources/4.8.0/src/activeqt/control/qaxfactory.h"

    in ./Desktop/Qt/4.8.0/mingw/include/ActiveQt/qaxaggregated.h

    //#include "../../src/activeqt/control/qaxaggregated.h"
    #include "../../QtSources/4.8.0/src/activeqt/control/qaxaggregated.h"

    in ./Desktop/Qt/4.8.0/mingw/include/ActiveQt/qaxobject.h

    //#include "../../src/activeqt/container/qaxobject.h"
    #include "../../QtSources/4.8.0/src/activeqt/container/qaxobject.h"

    2 - As suggested in http://www.qtcentre.org/archive/index.php/t-46402.html?s=113443eeba8f6e35dc6aa161ad2bdb7c ,

    added

    CONFIG += create_prl
    CONFIG += link_prl

    to ./QtSources/4.8.0/src/activeqt/container/container.pro

    but also

    to ./QtSources/4.8.0/src/activeqt/control/control.pro

    so I could get the
    QAxServer.prl
    QAxContainer.prl
    QAxServerd.prl
    QAxContainerd.prl
    files

    3 - Opened and compiled (for release AND debug) the projects found at:
    ./QtSources/4.8.0/src/activeqt/container/container.pro
    ./QtSources/4.8.0/src/activeqt/control/control.pro

    Make sure you clean them if you tried to compile before the above modifications

    4 - Copy the following files (original path may change according to your config when opening the .pro projects for the first time):

    ./QtSources/4.8.0/src/activeqt/control-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug/debug/QAxServerd.prl

    ./QtSources/4.8.0/src/activeqt/control-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug/debug/libQAxServerd.a

    ./QtSources/4.8.0/src/activeqt/control-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Release/release/QAxServer.prl

    ./QtSources/4.8.0/src/activeqt/control-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Release/release/libQAxServer.a

    ./QtSources/4.8.0/src/activeqt/container-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Release/release/QAxContainer.prl

    ./QtSources/4.8.0/src/activeqt/container-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Release/release/libQAxContainer.a

    ./QtSources/4.8.0/src/activeqt/container-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug/debug/QAxContainerd.prl

    ./QtSources/4.8.0/src/activeqt/container-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug/debug/libQAxContainerd.a

    to
    ./Desktop/Qt/4.8.0/mingw/lib/

    Be careful not to copy these .prl files, which I'm not sure would work:

    ./QtSources/4.8.0/src/activeqt/XXXXX-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug/release/XXXXX.prl

    ./QtSources/4.8.0/src/activeqt/XXXXX-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Release/debug/XXXXX.prl

    (they are in the "debug" directory under the "release" build and vice-versa)

    5 - Reboot

    Yeah, weird, but after doing all that, I kept getting "undefined reference" errors when compiling my projects (some windows library caching?). After a reboot, it worked fine.

    BR,

    Joao S Veiga


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.