Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Some crazy things are happening and I don't know what to do (Qt Creator / QMake).

Some crazy things are happening and I don't know what to do (Qt Creator / QMake).

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
5 Posts 2 Posters 622 Views 1 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.
  • W Offline
    W Offline
    Wodzu
    wrote on last edited by
    #1

    Hi guys,

    sorry for the title but I even don't know how to describe what is happening in one sentence.

    So, I have a Qt project that I am compiling on Ubuntu and on Mint. On Ubuntu it is compiling fine on Mint I get this error "‘if constexpr’ only available with -std=c++17 or -std=gnu++17"

    I've always used such configuration to get c++17 support:

    TEMPLATE = app
    CONFIG += console c++17
    CONFIG -= app_bundle
    CONFIG -= qt

    but somehow my Mint QtCreator does not accept it. Now, what is "funny" is I have exactly the same versions of QtCreator

    3d8ec4eb-4c9c-47ab-b321-d47e55700d08-image.png

    I've looked at QMake file and I've found the problem:

    Here is version from Ubuntu:

    172d14ca-b269-484b-9178-b58106eaceac-image.png

    and here is from Mint:

    6293c2ad-660d-454e-b9b7-4e9a35081ffb-image.png

    See the difference? Even though qmake is at the same version for both systems, the one on mint was compiled with Qt 5.9.5! How this is possible? How can I fix this?

    Thanks for any help.

    As above so below...

    aha_1980A 1 Reply Last reply
    0
    • W Wodzu

      Hi guys,

      sorry for the title but I even don't know how to describe what is happening in one sentence.

      So, I have a Qt project that I am compiling on Ubuntu and on Mint. On Ubuntu it is compiling fine on Mint I get this error "‘if constexpr’ only available with -std=c++17 or -std=gnu++17"

      I've always used such configuration to get c++17 support:

      TEMPLATE = app
      CONFIG += console c++17
      CONFIG -= app_bundle
      CONFIG -= qt

      but somehow my Mint QtCreator does not accept it. Now, what is "funny" is I have exactly the same versions of QtCreator

      3d8ec4eb-4c9c-47ab-b321-d47e55700d08-image.png

      I've looked at QMake file and I've found the problem:

      Here is version from Ubuntu:

      172d14ca-b269-484b-9178-b58106eaceac-image.png

      and here is from Mint:

      6293c2ad-660d-454e-b9b7-4e9a35081ffb-image.png

      See the difference? Even though qmake is at the same version for both systems, the one on mint was compiled with Qt 5.9.5! How this is possible? How can I fix this?

      Thanks for any help.

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by aha_1980
      #2

      @Wodzu said in Some crazy things are happening and I don't know what to do (Qt Creator / QMake).:

      Even though qmake is at the same version for both systems, the one on mint was compiled with Qt 5.9.5! How this is possible? How can I fix this?

      Are you using Qt 5.9 on Mint?

      The easiest solution to your problem would be to use CONFIG+=c++1z instead CONFIG+=c++17 The latter was introduced in Qt 5.12, the former exists some time longer.

      Regards

      Edit:

      sorry for the title but I even don't know how to describe what is happening in one sentence.

      How about: Cannot enable C++17 on Linux Mint but it is working on Ubuntu?

      Qt has to stay free or it will die.

      W 1 Reply Last reply
      0
      • W Offline
        W Offline
        Wodzu
        wrote on last edited by Wodzu
        #3

        Are you using Qt 5.9 on Mint?

        According to system information I am using Qt 5.13.1, but I remember uninstalling older version of Qt Creator and all its dependencies. Maybe it did not uninstall correctly and it did not remove qmake and it is pointing to the old version of qmake?

        The easiest solution to your problem would be to use CONFIG+=c++1z instead CONFIG+=c++17 The latter was introduced in Qt 5.12, the former exists some time longer.

        I've found out that solution but I would prefer to have exact installations to avoid further problems that I am not aware right now.

        As above so below...

        1 Reply Last reply
        0
        • aha_1980A aha_1980

          @Wodzu said in Some crazy things are happening and I don't know what to do (Qt Creator / QMake).:

          Even though qmake is at the same version for both systems, the one on mint was compiled with Qt 5.9.5! How this is possible? How can I fix this?

          Are you using Qt 5.9 on Mint?

          The easiest solution to your problem would be to use CONFIG+=c++1z instead CONFIG+=c++17 The latter was introduced in Qt 5.12, the former exists some time longer.

          Regards

          Edit:

          sorry for the title but I even don't know how to describe what is happening in one sentence.

          How about: Cannot enable C++17 on Linux Mint but it is working on Ubuntu?

          W Offline
          W Offline
          Wodzu
          wrote on last edited by
          #4

          Are you using Qt 5.9 on Mint?

          Hmm, it looks like I am using it:

          efdbbd50-73b3-463a-9efb-d253c9002276-image.png

          How can I upgrade?

          As above so below...

          1 Reply Last reply
          0
          • W Offline
            W Offline
            Wodzu
            wrote on last edited by
            #5

            I was able to update Qt, thanks for helping me out.

            As above so below...

            1 Reply Last reply
            1

            • Login

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