Results 1 to 8 of 8

Thread: Project won't compile under Windows (works under Linux)

  1. #1
    Join Date
    Feb 2006
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  2. #2
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default 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
    '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 ...
    Last edited by yogeshm02; 13th September 2006 at 16:25.

  3. #3
    Join Date
    Feb 2006
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Project won't compile under Windows (works under Linux)

    I have a folder Qt3Support/ with headers, yes...

  4. #4
    Join Date
    Feb 2006
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Project won't compile under Windows (works under Linux)

    Do you use qmake?

  6. #6
    Join Date
    Feb 2006
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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?

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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?

  8. #8
    Join Date
    Feb 2006
    Posts
    11
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default 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

Similar Threads

  1. Replies: 2
    Last Post: 30th August 2006, 10:09
  2. Porting Qt3 linux app to windows qt4
    By Philip_Anselmo in forum Qt Programming
    Replies: 7
    Last Post: 15th May 2006, 18:44
  3. how to corss compile for windows in Linux
    By safknw in forum Qt Programming
    Replies: 24
    Last Post: 13th May 2006, 05:23
  4. gcc (linux) : ok ; g++ (windows) : fails
    By nouknouk in forum Qt Programming
    Replies: 1
    Last Post: 25th February 2006, 03:08
  5. Replies: 4
    Last Post: 12th January 2006, 04:16

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.