Results 1 to 5 of 5

Thread: Crosscompile Qt in Linux

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

    Default Crosscompile Qt in Linux

    Hi.
    Is it possible to setup Linux and gcc so that I can compile my Qt apps in Linux, but compile them both for both Linux and MS Windows (and perhaps even Mac) with gcc?
    Any advice on how to do it, if possible?

  2. #2
    Join Date
    Mar 2006
    Location
    Vadodara, Gujarat, India
    Posts
    65
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Crosscompile Qt in Linux

    Hi,
    i think u can write the platform specific codes in your .cpp files, .h files and .pro file also so that it may compile and make an executable for all platforms, but compiling for other platform on some other platform, i don think its possible.

    But what u want to do by getting the exec. for all the platforms ... they gonna work the same way ... though the look and feel can be different on them all..

    Then also this is my thinking .... somebody experienced can put some more light on this topic
    Do what u r afraid to do, and the death of fear is sure.

  3. #3
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Crosscompile Qt in Linux

    As I know you may compile and install crosscompiler under Linux, for example MinGW and compile windows executables with it. Also read this: build a Win32 x-compiler for Linux
    P.S. My attempt to compile it failed. Please share your experience with us.

  4. #4
    Join Date
    Feb 2006
    Location
    Boulder, Colorado, USA
    Posts
    63
    Thanked 8 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Crosscompile Qt in Linux

    I have had success compiling very simple w32 apps on linux with the debian packges for ming32 on my debian box. I haven't tried with Qt. I think you would have to compile the windows qt4 with ming and possible hack them to use the wine libs for a the system calls, I'm not sure.

  5. #5
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Crosscompile Qt in Linux

    If you take the libs from $QTDIR/lib and headers from $QTDIR/include your aught to be able to build a cross compiled mingw-compatible version using the Qt-dlls provided with the win32 version of Qt.

Similar Threads

  1. Replies: 5
    Last Post: 15th January 2009, 09:03
  2. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  3. Deploying App on Linux
    By janus in forum Installation and Deployment
    Replies: 5
    Last Post: 6th May 2008, 21:18
  4. Replies: 19
    Last Post: 21st January 2008, 09:13

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.