Results 1 to 4 of 4

Thread: qapplication error when -DQT3_SUPPORT option

  1. #1

    Default qapplication error when -DQT3_SUPPORT option

    Hi all,
    I'm porting a linux qt3 app to win2000 qt4.1.4(opensource).
    I use qt3to4 to change my sources files and when trying to compile I got the following error :

    -----------
    In file included from /cygdrive/c/QT/4.1.4/include/Qt/qapplication.h:1,
    from main.cpp:3:
    /cygdrive/c/QT/4.1.4/include/Qt/../../src/gui/kernel/qapplication.h:254: error: ISO C++ forbids declaration of `WindowsV
    ersion' with no type
    /cygdrive/c/QT/4.1.4/include/Qt/../../src/gui/kernel/qapplication.h:254: error: invalid use of `::'
    /cygdrive/c/QT/4.1.4/include/Qt/../../src/gui/kernel/qapplication.h:254: error: expected `;' before "winVersion"
    /cygdrive/c/QT/4.1.4/include/Qt/../../src/gui/kernel/qapplication.h:259: error: expected `;' before "inline"
    make[2]: *** [main.o] Error 1
    -----------

    a quick look in qapplication.h gives :

    #if defined(Q_OS_WIN32) || defined(Q_OS_CYGWIN)
    static QT3_SUPPORT Qt::WindowsVersion winVersion() { return (Qt::WindowsVersion)QSysInfo::WindowsVersion; }
    #endif

    All of these seems to be correct so what happens ?
    Why is WindowsVersion in Qt not recognize ?

    Did so had such problems or any idea ?
    Thx alot !
    Stephane

  2. #2
    Join Date
    Apr 2006
    Posts
    20
    Thanks
    8
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qapplication error when -DQT3_SUPPORT option

    It looks like you miss some file included (declaring something with no type)... Could you post the include statements ?

  3. #3

    Default Re: qapplication error when -DQT3_SUPPORT option

    the "declaring with no type" is in qapplication.h from qt !!!!!
    that some WindowsVersion is not found is namespace Qt.
    That looks like internal problem (only happens when you set qt3 support).
    Is there anyone who compiled sth successfuly with this option ?

    $ make AM_LDFLAGS="-L/cygdrive/c/workStephane/ACE_wrappers/lib -llibACE -L/cygdrive/c/QT/4.1.4/bin -lQt3Support4 -lQtCore4 -lQtGui4" AM_CPPFLAGS="-I/cygdrive/c/workStephane/ACE_wrappers -I/cygdrive/c/QT/4.1.4/include -I/cygdrive/c/QT/4.1.4/include/Qt -I/cygdrive/c/QT/4.1.4/include/Qt3Support -I/cygdrive/c/QT/4.1.4/include/QtGui -DQT3_SUPPORT"

    Notice: I use AM_ in order to dont change my linux make system

  4. #4
    Join Date
    Apr 2006
    Posts
    20
    Thanks
    8
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: qapplication error when -DQT3_SUPPORT option

    Could you post main.cpp:3 ?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.