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. MinGW cross compilation on CentOS 8
QtWS25 Last Chance

MinGW cross compilation on CentOS 8

Scheduled Pinned Locked Moved Solved Installation and Deployment
3 Posts 2 Posters 672 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    For a CI/CD chain I need to be able to cross-compile Qt projects on CentOS 8, for Windows (MinGW). Unfortunately I have not been able to get it working. It needs to run locally since I can only run local agents on my Bamboo install (it's the 10$ version).

    What I have attempted so far is to compile Qt from source using the mingw package from the RHEL repos, which results in compilation errors due to missing headers. Adding the missing header only resulted in more compilation errors.
    Next I attempted to build mingw from source but the instructions of how to do that are extremely vague/incomplete and based on old versions. So that was a complete failure too.
    As a last attempt I hoped using the Windows compiler + wine would work, but using qmake.exe results in an error when adding it to the toolchain.

    Has anyone:

    • succesfully gotten mingw cross-compilation working on CentOS? If so how?
    • got any idea where an up-to-date instruction can be found for mingw (on CentOS preferably)?
    • other ways to cross-compile for mingw using a local Bamboo agent?
    aha_1980A 1 Reply Last reply
    0
    • ? A Former User

      For a CI/CD chain I need to be able to cross-compile Qt projects on CentOS 8, for Windows (MinGW). Unfortunately I have not been able to get it working. It needs to run locally since I can only run local agents on my Bamboo install (it's the 10$ version).

      What I have attempted so far is to compile Qt from source using the mingw package from the RHEL repos, which results in compilation errors due to missing headers. Adding the missing header only resulted in more compilation errors.
      Next I attempted to build mingw from source but the instructions of how to do that are extremely vague/incomplete and based on old versions. So that was a complete failure too.
      As a last attempt I hoped using the Windows compiler + wine would work, but using qmake.exe results in an error when adding it to the toolchain.

      Has anyone:

      • succesfully gotten mingw cross-compilation working on CentOS? If so how?
      • got any idea where an up-to-date instruction can be found for mingw (on CentOS preferably)?
      • other ways to cross-compile for mingw using a local Bamboo agent?
      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by aha_1980
      #2

      Hi @Sillie_wous,

      I'm not sure that helps you, but I used MXE to get a cross-MinGW with Qt libraries on my Ubuntu workstation. It worked flawlessy back then and I can cross-compile my apps for Windows on Linux now.

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      1
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        For future reference MXE does the trick for me too. Make sure to use the latest gcc version while building MXE (add MXE_PLUGIN_DIRS += plugins/gcc10 to settings.mk) otherwise you'll be compiling with c++ 11.

        1 Reply Last reply
        2

        • Login

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