Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    General and Desktop
    2
    2
    440
    Loading More Posts
    • 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
      A123 last edited by

      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 Reply Quote 0
      • C
        ChrisW67 last edited by

        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 Reply Quote 3
        • First post
          Last post