Project won't compile under Windows (works under Linux)
Hey guys-
I have a project that compiles fine under Linux, but won't compile under Windows.
When I try to compile it I get roughly 300 errors, most in q3mainwindow.h and the rest in my Designer-based class.
(The project was originally based in qt3 - I converted it to qt4 using uic3)
Most of the errors are repetitive, the following 2 probably account for 150 of them:
'ToolBarDock' : is not a member of 'Qt' c:\qt-win-opensource-src-4.1.4\src\qt3support\widgets\q3mainwindow.h 199
'setName' : is not a member of 'QAction' c:\documents and settings\thp\HitPt.h 107
Any ideas? Again, it compiled fine in Linux and gives me hell in Windows.
Thanks,
Philski
Re: Project won't compile under Windows (works under Linux)
Is your Qt4 compiled (on windows) with qt3 support?
Update: Now I can see that the earlier post had
Quote:
'ToolBarDock' : is not a member of 'Qt' c:\qt-win-opensource-src-4.1.4\src\qt3support\widgets\q3mainwindow.h 199
implying headers were already there ...
Re: Project won't compile under Windows (works under Linux)
I have a folder Qt3Support/ with headers, yes...
Re: Project won't compile under Windows (works under Linux)
OK, some success, I forgot to #define QT3SUPPORT
However I get these three error message repeated about 15 times:
syntax error : missing ';' before 'const' c:\qt-win-opensource-src-4.1.4\src\corelib\io\qiodevice.h 207
missing type specifier - int assumed. Note: C++ does not support default-int c:\qt-win-opensource-src-4.1.4\src\corelib\io\qiodevice.h 207
'int QT3_SUPPORT_VARIABLE' : redefinition c:\qt-win-opensource-src-4.1.4\src\corelib\io\qiodevice.h 207
just the line numbers change ...
any ideas?
thanks,
-philski
Re: Project won't compile under Windows (works under Linux)
Re: Project won't compile under Windows (works under Linux)
no, I've been using Visual C++.
Is there some other environment variable I am missing?
Re: Project won't compile under Windows (works under Linux)
Quote:
Originally Posted by philski
Is there some other environment variable I am missing?
These are not environment variables, only preprocessor macros. Maybe you should use qmake to generate proper VS project?
Re: Project won't compile under Windows (works under Linux)
Tried that (made a VS project tile from qmake). Still having the same issues.
Did a little bit of poking around - basically turns out that these two #defines:
QT3_SPPORT_CONSTRUCTOR
QT3_SUPPORT_VARIABLE
are not defined when several header files (qiodevice.h, qvariant.h, qregexp.h, qcolor.h, qpallette.h) are included by my code.
Not sure why. My project file has qt3support enabled and again, project compiles perfectly under Linux.
thanks,
-philski