Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Unsolved Error building cross-platform Qt

    Tools
    2
    2
    110
    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.
    • B
      bsdillon last edited by

      I have always built Qt on linux for linux, so this is my first time configuring for cross platform. I am on Ubuntu and building for windows. I followed instructions from several sites. This one (https://uncannier.com/cross-compile-qt-mingw-windows-applications-on-a-linux-host/) was the most explicit. I followed the directions but I am getting an error that appears to have nothing to do with cross platform.

      Let me start by saying what I have tried. I started with a Linux-to-Linux build of a simple GUI. I copied the .pro and renamed it to program_win. I downloaded and installed g++=minwg-w64 and tried to change the kit. I got an error indicating that compiler could not produce code for that version of qmake. After some googling I installed the Qt source code and went to /Qt/5.15.0/Src/ and ran configure. As far as I can tell it ran without error, but when I ran make I get an unexpected error.

      Project ERROR: Could not find feature c++2a
      

      I'm not sure what is causing the error. I believe that I am really close to getting the cross compilation process working, but this is a blocker for me.

      How do I fix the error?

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by

        Hi
        Im one of the naysayers he mentions in the article :)
        But i was wondering if it just needs
        something like
        CONFIG += c++2a
        or
        QMAKE_CXXFLAGS += -std=c++2a

        The error sounds like it wants c++20 draft enabled.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post