Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Cross-compile Windows on Linux and Qt
QtWS25 Last Chance

Cross-compile Windows on Linux and Qt

Scheduled Pinned Locked Moved General and Desktop
7 Posts 5 Posters 6.0k Views
  • 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.
  • R Offline
    R Offline
    RIVOPICO
    wrote on 15 Dec 2016, 01:53 last edited by A Former User
    #1

    Hi i want to compile since linux one .exe file for windows it's possible? and it's too hard to get this goal? Some idea how or some advice to get this goal?

    J 1 Reply Last reply 15 Dec 2016, 05:53
    0
    • R RIVOPICO
      15 Dec 2016, 01:53

      Hi i want to compile since linux one .exe file for windows it's possible? and it's too hard to get this goal? Some idea how or some advice to get this goal?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 15 Dec 2016, 05:53 last edited by
      #2

      @RIVOPICO IT is possible with MinGW, but it is way easier to do it on Windows.
      You will need to install MinGW and compile Qt using it.
      I never did this, so I don't have an detailed tutorial.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 15 Dec 2016, 09:26 last edited by mrjj
        #3

        Hi
        Compiling for windows on linux is hard to setup and maintain. ( I think/feel)
        Unless you are prepared to spend DAYS reading docs and understanding the toolchain
        completely it's not much fun. Also often you must compile Qt with mingw cross compiler. ( takes long time)
        So time wise,
        its much faster to grab virtual box and
        run a windows inside linux and do the compile there than to get
        Qt running as cross compile.

        https://www.tinc-vpn.org/examples/cross-compiling-64-bit-windows-binary/
        ( not with Qt. But idea is the same)

        1 Reply Last reply
        2
        • ? Offline
          ? Offline
          A Former User
          wrote on 15 Dec 2016, 14:41 last edited by
          #4

          Don't do it. It might be possible but it will be way too hard. Better set up a windows server and compile / test your stuff remotely.

          1 Reply Last reply
          2
          • M Offline
            M Offline
            Meteorhead
            wrote on 15 Dec 2016, 15:34 last edited by
            #5

            You can do it easily using the Windows Subsystem for Linux. With proper setup you can even do it at the press of a button if you can setup the Visual C++ for Linux VS Add-In and even debug the remote application with symbols brought over to the VS.

            ? 1 Reply Last reply 15 Dec 2016, 15:45
            0
            • M Meteorhead
              15 Dec 2016, 15:34

              You can do it easily using the Windows Subsystem for Linux. With proper setup you can even do it at the press of a button if you can setup the Visual C++ for Linux VS Add-In and even debug the remote application with symbols brought over to the VS.

              ? Offline
              ? Offline
              A Former User
              wrote on 15 Dec 2016, 15:45 last edited by
              #6

              @Meteorhead Unfortunatly no: WSL is a compatibility layer to run Ubuntu Linux binaries on Windows. The OP wants to cross-compile Windows binaries on Linux.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Meteorhead
                wrote on 15 Dec 2016, 15:49 last edited by
                #7

                Sry, I thought it was the other way around.

                1 Reply Last reply
                0

                4/7

                15 Dec 2016, 14:41

                • Login

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