Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cross Compile on OS X for Windows and Linux
Forum Updated to NodeBB v4.3 + New Features

Cross Compile on OS X for Windows and Linux

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 3 Posters 8.5k Views 1 Watching
  • 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 Offline
    T Offline
    tiagocc0
    wrote on last edited by
    #1

    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
    0
    • G Offline
      G Offline
      glasspusher
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        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
        0
        • T Offline
          T Offline
          tiagocc0
          wrote on last edited by
          #4

          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
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            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
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved