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. Qt 5.6: QMAKE and CONFIG = C++11 - is it safe to remove this?
Forum Updated to NodeBB v4.3 + New Features

Qt 5.6: QMAKE and CONFIG = C++11 - is it safe to remove this?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
qmakec++11qt 5.6
5 Posts 4 Posters 5.1k 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.
  • krzaqK Offline
    krzaqK Offline
    krzaq
    wrote on last edited by
    #1

    After upgrading to Qt 5.6 I was annoyed to learn that CONFIG had C++11 flag set by default. Not only it overrode my *g++*:QMAKE_CXXFLAGS += -std=c++1y, but also used the gnu version of the standard, which is not what I want.

    So, my question is: does this config value change anything else other than the -std= flag? If yes, how do I get my desired behaviour (compilation in standard-compliant mode with a recent standard, like 14 or 17)?

    1 Reply Last reply
    0
    • jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi!
      It is not clear to me: do you mean Qt 5.6 is built with C++11 support or where is this flag set by default?
      Did you try CONFIG += c++14?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      krzaqK 1 Reply Last reply
      0
      • JKSHJ Offline
        JKSHJ Offline
        JKSH
        Moderators
        wrote on last edited by
        #3

        @krzaq said:

        does this config value change anything else other than the -std= flag?

        No, feel free to remove or replace it.

        Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

        1 Reply Last reply
        1
        • jsulmJ jsulm

          Hi!
          It is not clear to me: do you mean Qt 5.6 is built with C++11 support or where is this flag set by default?
          Did you try CONFIG += c++14?

          krzaqK Offline
          krzaqK Offline
          krzaq
          wrote on last edited by
          #4

          @jsulm Yes I tried C++14 config, it results in -std=gnu++1y being added - not what I want.

          And I don't know whether Qt is built with C++11 or not. After switching to the 5.6 kit my project stopped building because -std=gnu++0x overrode my flag for c++1y.

          1 Reply Last reply
          0
          • Tom NaerlandT Offline
            Tom NaerlandT Offline
            Tom Naerland
            wrote on last edited by
            #5

            @krzaq I'm surprised anything changed at all with the c++14 flag. Are you using 5.6.0-rc ? In my caseCONFIG += c++11 c++14 doesn't seem to do anything at all when compiling to Android. I'm using 5.6.0-rc and with CONFIG += c++11 c++14 I'm just getting -std=c++11.

            With Qt 5.5.1 CONFIG += c++11 c++14 I get -std=c++1y added to the mix and I can use relevant functionality (std::make_unique).

            1 Reply Last reply
            0

            • Login

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