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. how to use mingw in QT Creator to compile to windows from linux?

how to use mingw in QT Creator to compile to windows from linux?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.1k 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.
  • A Offline
    A Offline
    A123
    wrote on last edited by
    #1

    I am trying to put together a kit to cross compile a Ubuntu C++ program (that doesn't need QT) in QT Creator to Windows. I have a MingW compiler but it complains that it won't work with my Qt gcc version.

    When I start up the QT maintenance tool there is no option to install a windows or mingw version of QT. Is there a painfree way to fix this?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      If you have a C++ program that does not require Qt then all you need is a working cross-compiler installation. This is available in the Ubuntu repository as mingw-64; it appears to give you GCC 7.
      That should work before you try to get any IDE to use it. Does that work?

      Once that is working, it should be a simple matter to tell Qt Creator to run the cross-compiler executable instead of the native g++. Your source and Makefile should not include Qt headers/libraries and therefore there should not be issues related to absence of these in the cross-compilation environment.

      1 Reply Last reply
      3

      • Login

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