Results 1 to 5 of 5

Thread: Console application should run on both Windows & LINUX platforms

  1. #1
    Join Date
    Feb 2011
    Posts
    36
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Console application should run on both Windows & LINUX platforms

    Hello Experts,

    I have built a console application which works fine in Windows. But I would like to know how to make it work under LINUX platform?

    Thanks,
    Sankar.

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Console application should run on both Windows & LINUX platforms

    C++ isn't portable in "executable" form.

    So the simple solution is to move the code to a Linux machine (you install the Qt SDK on this machine) and then build the application for Linux.
    //i guess virtual machine might be helpful, example Virtual Box (it's free).

  3. #3
    Join Date
    Feb 2011
    Posts
    36
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Console application should run on both Windows & LINUX platforms

    Thanks for your quick response Zlatomir.

    I will request my IT guys to try installing it and give it a try.

    But i read in one of the forum/blogs that we can built it from Windows platform itself?

    Sankar.

  4. #4
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Console application should run on both Windows & LINUX platforms

    Yes - you can try to find more information about cross compile.

    But i guess you will eventually need to test your application in a real Linux environment. And if at the end you still have a Linux machine why bother to setup the "cross compiling stuff" - this is what i meant with the simple solution

    And also you can install Virtual Box on your Windows and then install Linux in a virtual machine.

  5. #5
    Join Date
    Feb 2011
    Posts
    36
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Console application should run on both Windows & LINUX platforms

    Since we dont have LINUX environment setup here for development. Thats why i was hesitating to try it.

    Anyway i will try some cross compile option as you said earlier.

    Thanks,
    Sankar.

Similar Threads

  1. Qt application from linux to windows
    By chs in forum Newbie
    Replies: 6
    Last Post: 17th November 2009, 16:54
  2. Porting Qt application from linux to Windows
    By ankit17.ag in forum Qt Programming
    Replies: 5
    Last Post: 12th February 2009, 21:18
  3. Porting Qt Application from Windows to Linux
    By rajeshs in forum Qt Programming
    Replies: 7
    Last Post: 12th July 2007, 13:30
  4. Replies: 2
    Last Post: 9th June 2007, 19:19
  5. Porting Qt application on windows from linux
    By safknw in forum Qt Programming
    Replies: 13
    Last Post: 22nd May 2006, 13:11

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.