lundi 5 septembre 2016

QT requires C++11 support

I used QT 5.7 and gcc 4.9.2. QT Core module throw QT requires C++11 support error.

This page say that

gcc 4.9.2 fails to compile Qt.

So I installed gcc 4.8. I check using below command on terminal :

$ g++ --version
g++ (Ubuntu 4.8.4-1ubuntu15) 4.8.4

My kit uses cmake not qmake. I add TARGET_LINK_LIBRARIES ( xxxx yyyy /usr/bin/c++ -std=c++11 to CMakeLists-txt.

I restart my pc and run my application again. Same error is throwed.

/opt/Qt/5.7/gcc_64/include/QtCore/qbasicatomic.h:61: error: #error "Qt requires C++11 support"
 #  error "Qt requires C++11 support"
    ^

How can I solve it?

Aucun commentaire:

Enregistrer un commentaire