Need help compiling qt 3.3.8 on Win32 with MinGW ( gcc 4.5.2 )



  • Hi all,

    I'm facing ( not unespectedly ) problems compiling qt 3.3.8 on Win32 with MinGW ( latest at the moment I'n writing ) who provides gcc 4.5.2

    $ mingw32-gcc.exe --version
    mingw32-gcc.exe (GCC) 4.5.2

    I came across a first issue which I solved adding :

    extern bool qt_sendSpontaneousEvent(QObject *, QEvent *);

    in src\gui\inputmethod\qwininputcontext_win.cpp

    But can't really find any help to solve this one :

    g++ -c -w -O2 -fexceptions -frtti -DUNICODE -DQAX_SERVER -DQT_DLL -DQT_ACCESSIB
    ILITY_SUPPORT -DQT_NO_DEBUG -I"C:\Qt\3326ED~1.8\include" -I"." -I"tmp\moc\releas
    e_shared" -I"C:\Qt\3326ED~1.8\mkspecs\win32-g++" -o tmp\obj\release_shared\qaxse
    rverbase.o qaxserverbase.cpp
    qaxserverbase.cpp:89:17: error: 'QAxServerBase' was not declared in this scope
    qaxserverbase.cpp:89:30: error: template argument 1 is invalid
    qaxserverbase.cpp:89:49: error: invalid type in declaration before '=' token
    qaxserverbase.cpp:90:17: error: 'QAxServerBase' was not declared in this scope
    qaxserverbase.cpp:90:30: error: template argument 1 is invalid
    qaxserverbase.cpp: In function 'int* axServerMapper()':
    qaxserverbase.cpp:93:33: error: 'QAxServerBase' was not declared in this scope
    qaxserverbase.cpp:93:46: error: template argument 1 is invalid
    qaxserverbase.cpp: In function 'void axTakeServer(HWND__)':
    qaxserverbase.cpp:102:23: error: request for member 'take' in '
    axServerMapper(
    )', which is of non-class type 'int'
    qaxserverbase.cpp:103:29: error: request for member 'count' in '* axServerMapper
    ()', which is of non-class type 'int'
    qaxserverbase.cpp: In static member function 'static LRESULT QAxServerBase::Acti
    veXProc(HWND__, UINT, WPARAM, LPARAM)':
    qaxserverbase.cpp:1299:20: error: request for member 'insert' in '
    axServerMapp
    er()', which is of non-class type 'int'
    qaxserverbase.cpp:1309:45: error: request for member 'find' in '* axServerMapper
    ()', which is of non-class type 'int'
    qaxserverbase.cpp: In function 'int QAxEventFilter(MSG*)':
    qaxserverbase.cpp:3166:29: error: request for member 'find' in '* axServerMapper
    ()', which is of non-class type 'int'
    mingw32-make[3]: *** [tmp\obj\release_shared\qaxserverbase.o] Error 1
    g++ -c -w -O2 -fexceptions -frtti -DUNICODE -DQAX_SERVER -DQT_DLL -DQT_ACCESSIB
    ILITY_SUPPORT -DQT_NO_DEBUG -I"C:\Qt\3326ED~1.8\include" -I"." -I"tmp\moc\releas
    e_shared" -I"C:\Qt\3326ED~1.8\mkspecs\win32-g++" -o tmp\obj\release_shared\qaxbi
    ndable.o qaxbindable.cpp
    g++ -c -w -O2 -fexceptions -frtti -DUNICODE -DQAX_SERVER -DQT_DLL -DQT_ACCESSIB
    ILITY_SUPPORT -DQT_NO_DEBUG -I"C:\Qt\3326ED~1.8\include" -I"." -I"tmp\moc\releas
    e_shared" -I"C:\Qt\3326ED~1.8\mkspecs\win32-g++" -o tmp\obj\release_shared\qaxfa
    ctory.o qaxfactory.cpp
    g++ -c -w -O2 -fexceptions -frtti -DUNICODE -DQAX_SERVER -DQT_DLL -DQT_ACCESSIB
    ILITY_SUPPORT -DQT_NO_DEBUG -I"C:\Qt\3326ED~1.8\include" -I"." -I"tmp\moc\releas
    e_shared" -I"C:\Qt\3326ED~1.8\mkspecs\win32-g++" -o tmp\obj\release_shared\qaxse
    rvermain.o qaxservermain.cpp
    g++ -c -w -O2 -fexceptions -frtti -DUNICODE -DQAX_SERVER -DQT_DLL -DQT_ACCESSIB
    ILITY_SUPPORT -DQT_NO_DEBUG -I"C:\Qt\3326ED~1.8\include" -I"." -I"tmp\moc\releas
    e_shared" -I"C:\Qt\3326ED~1.8\mkspecs\win32-g++" -o tmp\obj\release_shared\qaxse
    rverdll.o qaxserverdll.cpp
    g++ -c -w -O2 -fexceptions -frtti -DUNICODE -DQAX_SERVER -DQT_DLL -DQT_ACCESSIB
    ILITY_SUPPORT -DQT_NO_DEBUG -I"C:\Qt\3326ED~1.8\include" -I"." -I"tmp\moc\releas
    e_shared" -I"C:\Qt\3326ED~1.8\mkspecs\win32-g++" -o tmp\obj\release_shared\qaxma
    in.o qaxmain.cpp
    g++ -c -w -O2 -fexceptions -frtti -DUNICODE -DQAX_SERVER -DQT_DLL -DQT_ACCESSIB
    ILITY_SUPPORT -DQT_NO_DEBUG -I"C:\Qt\3326ED~1.8\include" -I"." -I"tmp\moc\releas
    e_shared" -I"C:\Qt\3326ED~1.8\mkspecs\win32-g++" -o tmp\obj\release_shared\types
    .o ..\shared\types.cpp
    ..\shared\types.cpp: In function 'bool VARIANTToQUObject(const VARIANT&, QUObjec
    t*, const QUParameter*)':
    ..\shared\types.cpp:937:48: note: candidate 1: operator==(int, int) <built-in>
    C:\Qt\3326ED~1.8\include/qstring.h:302:13: note: candidate 2: bool operator==(ch
    ar, QChar)
    ..\shared\types.cpp:937:48: note: candidate 1: operator==(int, int) <built-in>
    C:\Qt\3326ED~1.8\include/qstring.h:302:13: note: candidate 2: bool operator==(ch
    ar, QChar)
    ..\shared\types.cpp:973:48: note: candidate 1: operator==(int, int) <built-in>
    C:\Qt\3326ED~1.8\include/qstring.h:302:13: note: candidate 2: bool operator==(ch
    ar, QChar)
    ..\shared\types.cpp:973:48: note: candidate 1: operator==(int, int) <built-in>
    C:\Qt\3326ED~1.8\include/qstring.h:302:13: note: candidate 2: bool operator==(ch
    ar, QChar)
    ..\shared\types.cpp:1005:48: note: candidate 1: operator==(int, int) <built-in>
    C:\Qt\3326ED~1.8\include/qstring.h:302:13: note: candidate 2: bool operator==(ch
    ar, QChar)
    ..\shared\types.cpp:1005:48: note: candidate 1: operator==(int, int) <built-in>
    C:\Qt\3326ED~1.8\include/qstring.h:302:13: note: candidate 2: bool operator==(ch
    ar, QChar)
    mingw32-make[3]: Target all' not remade because of errors. mingw32-make[3]: Leaving directoryC:/Qt/3.3.8/extensions/activeqt/control'
    mingw32-make[2]: *** [sub-control] Error 2
    mingw32-make[2]: Target all' not remade because of errors. mingw32-make[2]: Leaving directoryC:/Qt/3.3.8/extensions/activeqt'
    mingw32-make[1]: *** [sub-activeqt] Error 2
    mingw32-make[1]: Target all' not remade because of errors. mingw32-make[1]: Leaving directoryC:/Qt/3.3.8/extensions'
    mingw32-make: *** [sub-extensions] Error 2

    Any tip is really appreciated! thanks in advance.



  • I doubt Qt 3.3 supported MinGw 4.5.

    Best tip: upgrade to a more recent Qt, like 4.7.1 if at all possible!



  • Thanks for your reply. I need to use version 3.3.8 .

    If it is not possible i'd rather go back to gcc3. what would you suggest?



  • Hey,

    I had a similar trouble while building qt3.3.2 with MinGW 4.5.
    To resolve the error ‘QAxServerBase’ was not declared in this scope,
    move the QAxServerBase class definition (found in qaxserverbase.cpp) above the axServerMapper() declaration.

    Hope this helps.


Log in to reply
 

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