Qt 5.14.1 won't compile anything on my CentOS-7
-
I installed 5.14.1 on Centos-7 a couple days ago. Problem is that nothing, not even the simplest example code will build. Every attempt to compile anything generates the following error:
#error “Qt requires C++11 support”
I have tried the obvious fixes, but they have no effect:
CONFIG += c++11
QMAKE_CXXFLAGS += -std=c++11I have zero issues building with 5.12.4 or 5.12.6, but I have been waiting for a fix that is only in 5.14.1. Here is the relevant information from my CentOS-7 system:
cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"uname -r
3.10.0-693.21.1.el7.x86_64gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.I have also tried it on another CentOS-7 machine with the same result. Is anyone else experiencing an issue with 5.14.1 on CentOS-7?
-
According to GCC themselves, it has pretty much full C++11 support (https://gcc.gnu.org/gcc-4.8/cxx0x_status.html). So I think this is something you should raise on Qt bugtracker.
I think CentOS allows upgrading GCC (some devel package or something, sorry I don't remember the name), maybe you should try that?
-
@Bob-Fachetti
5.14.1 requires gcc > 5.0 even though the official documentation says it supports gcc > 4.8.5 . for generic Linux (CentOS-7). -
@Bob-Fachetti said in Qt 5.14.1 won't compile anything on my CentOS-7:
Qt requires C++11 support
Where exactly do you get this message? From qbasicatomic.h ?
Can you show us all compiler options?See https://codereview.qt-project.org/c/qt/qtbase/+/288702 and https://codereview.qt-project.org/c/qt/qtbase/+/285582
/edit: ok - gcc < 5 is not supported with Qt5.14 anymore: https://codereview.qt-project.org/c/qt/qtdoc/+/288825
-
@YanChenyu Please post in english.