Unsolved C++14 with Qt5.7
-
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 ?
-
Hi and welcome to devnet,
Which version of Xcode are you using ?
-
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
-
Just filled a bug report
https://bugreports.qt.io/browse/QTBUG-53002 -
Thanks !