Results 1 to 11 of 11

Thread: Cross compiling QT3 on Linux, for win32

  1. #1
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Smile Cross compiling QT3 on Linux, for win32

    Hello,

    I am attempting to cross compile QT3.3.5 on Debian, for win32 (his is simply so that I can avoid having to reboot so frequently). It is possible (or even likely!) that I'm going about this the wrong way, but what I have done is installed mingw32, downloaded the QT/X11 source and configured it with

    Qt Code:
    1. configure -static -xplatform win32-g++ -prefix /home/foobar/qt3
    To copy to clipboard, switch view to plain text mode 

    This fails with an "Internal error", however out of curiosity I commented it out in the code to see how far I could get it to compile. On running make, the following errors appear:

    Qt Code:
    1. In file included from kernel/qapplication_x11.cpp:47:
    2. /home/foobar/source/qt3/mkspecs/win32-g++/qplatformdefs.h:14:19: tchar.h: No such file or directory
    3. /home/foobar/source/qt3/mkspecs/win32-g++/qplatformdefs.h:15:16: io.h: No such file or directory
    4. /home/foobar/source/qt3/mkspecs/win32-g++/qplatformdefs.h:16:20: direct.h: No such file or directory
    5. /home/foobar/source/qt3/mkspecs/win32-g++/qplatformdefs.h:22:21: windows.h: No such file or directory
    6. make[2]: *** [.obj/release-static/qapplication_x11.o] Error 1
    To copy to clipboard, switch view to plain text mode 

    So perhaps there is a better way of going about this ? (Incidentally, the header files do exist, however the same error appears when adding an explicit -I/path/to/headers...).

    Any suggestions would be most welcome !

    Cheers,

    mjrich

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cross compiling QT3 on Linux, for win32

    You can't use the Qt3/x11-version with windows...

  3. #3
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cross compiling QT3 on Linux, for win32

    Yes, however it doesn't seem to be possible to compile the plain QT/win32 sources on Linux either (short of compiling inside of Wine).

    So, how does one cross compile QT3 on Linux for win32 ?

    Cheers,

    mjrich

  4. #4
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cross compiling QT3 on Linux, for win32

    You need the commercial qt3 version from Trolltech. Then this should work

  5. #5
    Join Date
    Jan 2006
    Posts
    109
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Cross compiling QT3 on Linux, for win32

    Quote Originally Posted by ChristianEhrlicher
    You need the commercial qt3 version from Trolltech. Then this should work
    I don't hink this would work better with the commercial version than the open source version.

    Qt/X11 won't build on Windows or using a cross-compiler tailored for Windows.

    Qt/Win won't build on Linux.

    Unless you heavily customize Qt and/or the compiling environment.

  6. #6
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cross compiling QT3 on Linux, for win32

    Quote Originally Posted by dimitri
    I don't hink this would work better with the commercial version than the open source version.
    Qt/X11 won't build on Windows or using a cross-compiler tailored for Windows.
    Qt/Win won't build on Linux.
    Unless you heavily customize Qt and/or the compiling environment.
    Yes, I'd pretty much come to that conclusion after much playing around, wailing and gnashing of teeth. The closest solution I've come to is from silmor.de's Qt4 experiments -- compile the windows libraries on windows, copy them across to Linux where a matching X11 version exists, and then switch between the two using a modified makefile for the the former.

    If anyone comes across a simpler method, it would be gratefully received however!

    Cheers,

    mjrich

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Cross compiling QT3 on Linux, for win32

    For Qt3 there is no solution. Qt3 Open Source can't be compiled on Windows! You need dedicated commercial version sources for that.

  8. #8
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cross compiling QT3 on Linux, for win32

    Quote Originally Posted by wysota
    Qt3 Open Source can't be compiled on Windows! You need dedicated commercial version sources for that.
    Well, these Qt3 sources compiled cleanly under Win32, using mingw-g++. Of course, that doesn't solve the initial problem of having to boot into windows, but it does mean that the same QT3/c++ code can (nearly) be compiled to run on both platforms without too many difficulties.

    Regards,

    mjrich.

  9. #9
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cross compiling QT3 on Linux, for win32

    Quote Originally Posted by mjrich
    Well, these Qt3 sources compiled cleanly under Win32, using mingw-g++. Of course, that doesn't solve the initial problem of having to boot into windows, but it does mean that the same QT3/c++ code can (nearly) be compiled to run on both platforms without too many difficulties.

    Regards,

    mjrich.
    But keep in mind that this code isn't from Trolltech. Also there are some bugs which won't be fixed anymore now that Qt4/gpl is out.
    But it is (or better: was) possible to cross-compile those sources on linux for win32. It was broken some time ago and nobody fixed it because of a lack of interest.

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Cross compiling QT3 on Linux, for win32

    Quote Originally Posted by mjrich
    Well, these Qt3 sources compiled cleanly under Win32, using mingw-g++. Of course, that doesn't solve the initial problem of having to boot into windows, but it does mean that the same QT3/c++ code can (nearly) be compiled to run on both platforms without too many difficulties.
    Wrong. This code is a port from Qt3 Unix/Free to Windows. It required heavy work to become compilable and usable and doesn't work exactly as the "original" Windows version. It's not just taken from Trolltech and compiled.

  11. #11
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Cross compiling QT3 on Linux, for win32

    Quote Originally Posted by ChristianEhrlicher
    But keep in mind that this code isn't from Trolltech.
    The beauty of open source
    But it is (or better: was) possible to cross-compile those sources on linux for win32. It was broken some time ago and nobody fixed it because of a lack of interest.
    Now this is certainly interesting, and something I hadn't realised. Thank you Christian -- I will look at the code again if I have time, and see whether it can be resurrected.

    Regards,

    mjrich.

Similar Threads

  1. Compiling Problem qt/embedded 4.4.1 linux scratchbox arm
    By hw in forum Installation and Deployment
    Replies: 0
    Last Post: 11th September 2008, 20:25
  2. Cross compiling setup for all platforms
    By oc2k1 in forum Installation and Deployment
    Replies: 0
    Last Post: 5th February 2008, 14:42
  3. Compiling Linux project on Mac
    By December in forum Newbie
    Replies: 2
    Last Post: 25th March 2007, 05:25
  4. Replies: 1
    Last Post: 19th January 2007, 12:27

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.