Results 1 to 9 of 9

Thread: how to port application made in linux to windows platform

  1. #1
    Join Date
    Mar 2011
    Posts
    21
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how to port application made in linux to windows platform

    i made a simple application in fedora 14 using qt4 ......and got all the necessary files
    including the application file a.out, now since qt4 is known as cross-platform framework
    how to port my application to windows

  2. #2
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to port application made in linux to windows platform

    Quote Originally Posted by sachinmcajnu View Post
    i made a simple application in fedora 14 using qt4 ......and got all the necessary files
    including the application file a.out, now since qt4 is known as cross-platform framework
    how to port my application to windows
    As you said and know, Qt is a cross-platform framework, so...

  3. #3
    Join Date
    Mar 2011
    Posts
    21
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to port application made in linux to windows platform

    Quote Originally Posted by agarny View Post
    As you said and know, Qt is a cross-platform framework, so...
    i didnot understand...........what u said.....

  4. #4
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to port application made in linux to windows platform

    I meant that because Qt is a cross-platform framework, then if your code works on Linux, then there is a very good chance that it's going to work fine on Windows unless you did something that is specific to the Linux platform. Anyway, the point is: install Qt on Windows and try to compile your application, and you will know.

  5. #5
    Join Date
    Mar 2011
    Posts
    21
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to port application made in linux to windows platform

    thank you for the reply
    i have a doubt.....if i give some application to my friend that is a.out file will he be able to use it directly by ./a.out
    or will he need some qt libraries ..............for it to work

  6. #6
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: how to port application made in linux to windows platform

    Transfer your source files to Windows; install Qt for Windows; compile your application under Windows. Unless you've made use of Linux-specific libraries or system calls, everything should work just as it did under Linux.

  7. The following user says thank you to SixDegrees for this useful post:

    sachinmcajnu (11th March 2011)

  8. #7
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to port application made in linux to windows platform

    First, I am surprised that you are getting an a.out file. This is the name of the binary file that is generated by a compiler when no explicit output name is given. As far as I know, that shouldn't happen with Qt...?

    Second, to give the binary file is not sufficient, unless you compiled your Qt application statically, but this is not what is done by default. In other words, you will most likely have to distribute some Qt libraries along with your binary. Personally, to avoid any risk of missing a Qt library, I have a virtual machine with a 'blank' version of Linux on it. From there, I just try my Qt binary and see what is missing and adds it until I get a fully working version.

  9. The following user says thank you to agarny for this useful post:

    sachinmcajnu (11th March 2011)

  10. #8
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: how to port application made in linux to windows platform

    Probably he compiles manually single source file (g++ ...).
    I would recommend to use qmake. Just run:
    qmake -project
    In directory with source code to generate simple project file (*.pro) (output file name will be based on current directory name).
    In this file you can set output file name:
    TARGET=someApplicationName
    From this point build process will be simple:
    qmake
    make
    In Linux, In Windows replace make with mingw32-make or nmake depending on used compiler.

  11. #9
    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: how to port application made in linux to windows platform

    There is always a possibility of:
    qmake Code:
    1. TARGET = a.out
    To copy to clipboard, switch view to plain text mode 
    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.


Similar Threads

  1. linux project made in windows
    By alimooghashang in forum Qt Programming
    Replies: 2
    Last Post: 26th August 2010, 06:46
  2. How to port windows app to linux
    By sudheer168 in forum Qt Programming
    Replies: 4
    Last Post: 15th October 2009, 08:39
  3. Port Shared Library from Linux to Windows
    By calh1578 in forum Qt Programming
    Replies: 2
    Last Post: 28th September 2009, 18:14
  4. Linux -> Windows port issue (signals)
    By robertogoberto in forum Qt Programming
    Replies: 2
    Last Post: 21st September 2009, 07:44
  5. how to port Qt windows application to mobile
    By pallavi Boyapat in forum Qt Programming
    Replies: 8
    Last Post: 26th January 2009, 13:57

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.