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. C++14 with Qt5.7
Forum Updated to NodeBB v4.3 + New Features

C++14 with Qt5.7

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 2.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.
  • Nuno NunesN Offline
    Nuno NunesN Offline
    Nuno Nunes
    wrote on last edited by
    #1

    I have a program that uses c++14 and CMake in OSX.
    Using Qt 5.6 and QtCreator 4.0 rc1 I have no problem compiling.

    The config in CMake to specify c++14 that I use is

    if (APPLE)
    set (CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=c++14 -stdlib=libc++”)
    endif (APPLE)

    When I try to compile in Qt5.7 I have this error:
    std::make_unique (no member make_unique in std)
    If I change the code to c++11 all goes well. It seams that with Qt 5.7 the code is forced to be c++11 even if we want to use a newer standard.

    Does anyone has this error also ?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Which version of Xcode are you using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Nuno NunesN Offline
        Nuno NunesN Offline
        Nuno Nunes
        wrote on last edited by
        #3

        Hello
        I'm using Xcode 7.3 in OSX 10.11.4 and CMake 3.5.2
        Didn't try with qmake.
        When I choose Qt5.6 kit it compiles c++14 well, when I choose Qt5.7 kit (using the same editor) seems like the c++14 option is overwritten later by c++11 and I cannot compile c++14.
        Is somehow Qt5.7 forcing c++11 ??

        I tried to replace mkspecs dir of Qt5.7 with the ones of Qt5.6 but it didn't help.

        I may try to create later on a small code example to check better (or tomorrow I I'm with little time now).

        Thanks

        1 Reply Last reply
        0
        • Nuno NunesN Offline
          Nuno NunesN Offline
          Nuno Nunes
          wrote on last edited by
          #4

          Just filled a bug report
          https://bugreports.qt.io/browse/QTBUG-53002

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Thanks !

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            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