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
Forum Updated to NodeBB v4.3 + New Features

Cross-compile Windows on Linux and Qt

Scheduled Pinned Locked Moved General and Desktop
7 Posts 5 Posters 6.0k Views 2 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.
  • RIVOPICOR Offline
    RIVOPICOR Offline
    RIVOPICO
    wrote on 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?

    jsulmJ 1 Reply Last reply
    0
    • RIVOPICOR RIVOPICO

      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?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on 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
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on 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 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 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
            0
            • M Meteorhead

              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 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 last edited by
                #7

                Sry, I thought it was the other way around.

                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