views:

984

answers:

3

To create a .exe in Linux using Qt SDK, should I cross compile my application in Linux or cross compile my application in Windows? I am totally confused. :(

Please help.

+1  A: 

You need to cross compile on Linux, for windows.

EDIT:

  1. install MinGW on Linux.
  2. cross-compile your Qt code on Linux. A windows binary (.exe) should be produced.
  3. You are done. Happily execute the exe on any windows system with Qt runtime libraries.

Hope that clears things up.

jrh

Here Be Wolves
ok thanks... so , do i need to install MinGW on Linux or windows???
suse
i have refered to the link which u gave me before http://silmor.de/29. , but its confusing me a bit:(so pls give me clear picture of wat to be done!!!! ... pls reply
suse
I've edited my ans to add details.
Here Be Wolves
Thanks a lots :) :)
suse
+1  A: 

Either cross-compile in Linux, or compile in Windows.

Alan Haggai Alavi
ok thanks... so , do i need to install MinGW on Linux or windows???
suse
You have to install MingW in Linux, for cross-compiling.
Alan Haggai Alavi
ok.. thanks a lots..by installing QT SDK and MingW in Linux,is it able to get .exe for windows.. pls do tel me what else should i install in Linux to generate .exe????
suse
Sorry to say, but I have not yet been able to set up my cross-compiling environment. So, I am out of answers. :-(
Alan Haggai Alavi
+1  A: 

First off, kvg. Google search for "cross-compiling qt applications in linux for windows" and first link that comes up is this: http://silmor.de/29

The steps should be simple:

  • install mingw
  • install qt linux binaries so that you get qmake and moc and other stuff needed for compilation.
  • get windows qt binaries and other possible libraries your application requires.
  • create a new qmake configuration files (see silmor.de page for more details)
  • go to your source folder and call qmake -spec $SpecFileCreatedInStep4
  • make
  • profit!!
  • close your questions in so.
rasjani