herachiel
27th June 2006, 11:40
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
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