View Full Version : Project won't compile under Windows (works under Linux)

13th September 2006, 16:58
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.



13th September 2006, 17:09
Is your Qt4 compiled (on windows) with qt3 support?

Update: Now I can see that the earlier post had

'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 ...

13th September 2006, 17:17
I have a folder Qt3Support/ with headers, yes...

13th September 2006, 17:49
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?



13th September 2006, 18:10
Do you use qmake?

13th September 2006, 18:36
no, I've been using Visual C++.

Is there some other environment variable I am missing?

13th September 2006, 18:45
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?

14th September 2006, 16:29
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:


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.