qmake substituting c++14 with c++1
-
wrote on 17 Mar 2015, 18:16 last edited by
I'm using Qt Creator 3.3.2 to build a c++ project. I'm using clang 3.5 and the std lib that comes with gcc 4.9. In the qmake project file I've added the line CONFIG += c++14. In the resulting makefile it says -std=c++11 however, and my program will not compile. If I manually edit the makefile to -std=c++14 everything works as expected.
This is ok, but sometimes the makefile will be overwritten by changes to my project layout and I have to edit it again. Is there a way around this? -
wrote on 17 Mar 2015, 20:35 last edited by
Should work with qmake from Qt 5.4.0 or higher...
-
I'm using Qt Creator 3.3.2 to build a c++ project. I'm using clang 3.5 and the std lib that comes with gcc 4.9. In the qmake project file I've added the line CONFIG += c++14. In the resulting makefile it says -std=c++11 however, and my program will not compile. If I manually edit the makefile to -std=c++14 everything works as expected.
This is ok, but sometimes the makefile will be overwritten by changes to my project layout and I have to edit it again. Is there a way around this?wrote on 18 Mar 2015, 03:08 last edited by@B_old Take a look on the directory
Qt/5.4/clang/mkspecs/common
. It contains qmake base configuration files for various compilers.
You can setQMAKE_CXXFLAGS_CXX11 = -std=c++14
inclang.conf
to make a qmake to generate a Makefile with c++14. -
wrote on 19 Mar 2015, 21:40 last edited by
Under Qt/5.4/ I only see android_armv7 and gcc_64. I think I installed clang after Qt. Could that be the reason?
-
Under Qt/5.4/ I only see android_armv7 and gcc_64. I think I installed clang after Qt. Could that be the reason?
wrote on 21 Mar 2015, 19:21 last edited by A Former User@B_old Could you solve the issue in the meantime?
-
wrote on 21 Mar 2015, 23:04 last edited by
Unfortunately not. I basically gave up when I found out that the clang config seems to be missing. In practice I don't have to touch the makefile very often.
-
Under Qt/5.4/ I only see android_armv7 and gcc_64. I think I installed clang after Qt. Could that be the reason?
-
wrote on 25 Mar 2015, 17:06 last edited by
Ah, now I found it. Your suggestions also solved the problem! Thanks for the help.
2/8