Results 1 to 14 of 14

Thread: Creating executable for windows using QT program in Linux

  1. #1
    Join Date
    May 2009
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Creating executable for windows using QT program in Linux

    hello,

    Is it possible to create an executable for Linux and windows using the same QT code in Linux with Eclipse integration or is it necessary to install QT Creator in my Linux machine?

    Waiting for reply

    Thanks in advance

    vincat.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Creating executable for windows using QT program in Linux

    Yes, it's possible provided you have a cross-compiler.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    May 2009
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Creating executable for windows using QT program in Linux

    pls tel me which is the cross compiler to be used in Linux?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Creating executable for windows using QT program in Linux

    Please use a web search engine to find information about cross-compilers. As for me you can use GCC/MinGW.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    May 2009
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Creating executable for windows using QT program in Linux

    Can i use QT Creator in Linux just to create executable for Windows.???
    or is Cross compiler must to use??

    I guess QT creator in Linux will be having an option to build code for windows??
    if i'm wrong pls do suggest me

    Sorry for the trouble....

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Creating executable for windows using QT program in Linux

    Qt Creator is a text editor, not a compiler. You need a compiler to do the compilation. Qt Creator doesn't have "options to create binaries for X". This is done by qmake and the compiler. You change the target you build for by pointing qmake to a proper specification file. Then qmake will generate a makefile for a specific (cross)compiler you need to have.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    May 2009
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Creating executable for windows using QT program in Linux

    ok thanks..but i'm bit comfused....

    I have developed a small project with Qt Eclipse integration on linux and i would like to make a windows executable file (.exe) for the same project using QT, So, my app could run on both systems.
    will my QT with Eclipse as plugin help me to generate .exe in Linux.

    pls tel me what is the procedure to get .exe from Linux and what has to be installed???

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Creating executable for windows using QT program in Linux

    It would really be better if you just read about cross-compiling on the Internet.

    Start with these:
    http://en.wikipedia.org/wiki/Cross_compile
    https://fedoraproject.org/wiki/Featu...cross_compiler
    http://silmor.de/39
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Oct 2006
    Location
    Hawaii
    Posts
    130
    Thanks
    48
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Creating executable for windows using QT program in Linux

    I am kindof lazy, and found cross compiling to be tedious, so I just installed a copy of windows in either the free Vmware or Virtualbox. I then use the Mingw Qt in the virtual machine.

    The exact same source code can then compile on your Linux host, and in the virtual machine, with the added value that you can use the virtual machine to not only compile the Qt code, but also to test it in windows, especially if you have any platform dependent code in your program.

  10. #10
    Join Date
    May 2009
    Posts
    8
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Creating executable for windows using QT program in Linux

    Thanks for the information. Can you pls guide me which cross-compiler to be installed in linux and i also already have GCC compiler in my linux machine. Should that be replaced by GCC cross-compiler. Is GCC compiler and cross-compiler are same or we get it in different packages??

    Pls do reply.

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Creating executable for windows using QT program in Linux

    Why don't you follow the links I gave you?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  12. #12
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Creating executable for windows using QT program in Linux

    Quote Originally Posted by wysota View Post
    Why don't you follow the links I gave you?
    why dont u give your laptop to him which is preinstalled with every cross compiler and then fly to his house and do the coding and compiling... dont forget to test before leaving

  13. #13
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: Creating executable for windows using QT program in Linux

    I don't think he knows Polish so my laptop won't do him any good
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  14. #14
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Creating executable for windows using QT program in Linux

    oh man.. he is really out of luck then.

Similar Threads

  1. Program in Windows, Deploy in Linux
    By suitto in forum Installation and Deployment
    Replies: 1
    Last Post: 8th April 2009, 13:11
  2. Replies: 19
    Last Post: 21st January 2008, 09:13
  3. QT Program debug,GDB on Linux
    By darpan in forum General Programming
    Replies: 1
    Last Post: 26th January 2007, 22:02
  4. QT MySQL
    By sabeeshcs in forum Newbie
    Replies: 6
    Last Post: 12th January 2007, 04:19

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.