Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Cross Compile on OS X for Windows and Linux

    Installation and Deployment
    3
    5
    7850
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tiagocc0 last edited by

      Just reporting something I just found out and tested.

      As you can see here:
      http://crossgcc.rts-software.org/doku.php?id=start

      Pierre Molinaro has compiled Qt 4.8.4 with MinGW so you can use Qt Creator on Mac OS X to build Windows applications:
      http://crossgcc.rts-software.org/doku.php?id=compiling_for_win32

      It is statically built so after compiling you end up with a single exe that you can run without the need of DLLs.
      I have just tested this on OS X 10.9, Qt Creator 3.0.1 and the application was tested on Windows XP SP3 inside Parallels.

      A quick tutorial:

      1. If you download it (gcc-4.8.0-qt-4.8.4-for-mingw32.dmg) you will have a DMG file, inside a PKG which you can install, it will install MinGW and Qt 4.8.4 on this directory:
        /usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/

      2. Then go to Qt Creator, Preferences, Build & Run, Compilers and click on Add, select GCC and go to:
        /usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin
        and choose i586-mingw32-gcc

      3. Apply changes then go to Qt Versions, click on Add and go to:
        /usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-qt/bin
        and choose qmake

      4. Apply changes then go to Kits, click on Add and on Compiler combobox choose your newly added compiler.
        On Qt Version combobox choose your newly added 4.8.4 Qt, on debugger combobox I left it as None.

      5. Then you can just work on your project as you normally would.

      There is also Linux and ARM versions there but I didn't try those.

      1 Reply Last reply Reply Quote 0
      • G
        glasspusher last edited by

        Very nice! Thanks for this, your directions were flawless.

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          You should consider making a little wiki entry of this information, the forum post tends to get lost under the dust of time

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 0
          • T
            tiagocc0 last edited by

            I will see if I can do it, but the project isn't mine, Pierre might change it and thus the guide wouldn't work anymore. I just tested one of the binaries too.

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              Ok, then the best is to talk with him about the wiki entry :)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply Reply Quote 0
              • First post
                Last post