Should I cross-compile in Linux or Windows?

后端 未结 3 1921
长情又很酷
长情又很酷 2020-12-06 14:10

To create a .exe in Linux using Qt SDK, should I cross compile my application in Linux or cross-compile my application in Windows?

相关标签:
3条回答
  • 2020-12-06 14:28

    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

    0 讨论(0)
  • 2020-12-06 14:31

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

    0 讨论(0)
  • 2020-12-06 14:48

    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.
    0 讨论(0)
提交回复
热议问题