How to build Qt 5 from source with c++14 support

phcerdan

I am attempting to build Qt 5.4.1 pulled from git with the -std=c++14 flag for gcc4.9. But I am not sure about how to properly pass the flag into the build process.

I have read that adding CONFIG += c++14 to a qt project file should work since Qt5.4, so I have added it into the qt.pro located in the top folder.

But Qt is still compiled with -std=c++0x (c++11).

Tomilov Anatoliy

If you using g++ or clang++ to build the Qt 5, then go to qt5/qtbase/mkspecs/common/g++-base.conf or qt5/qtbase/mkspecs/common/clang.conf respectively and simply change the right hand side of QMAKE_CXXFLAGS_CXX11 = -std=c++11 assignment to (for example) -std=gnu++1z (or to whatever you need).

To build Qt 5 you have to run qt5/configure script with -c++11 provided (and -platform linux-clang-libc++ or linux-clang or linux-g++ or whatever you need — the parameter is the qt/qtbase/mkspecs/*/ directory name represented your platform).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to build v4 support library from source

From Dev

How to build vim80 from source with python2 and 3 support?

From Dev

How to build Compiz from source?

From Dev

How to build Qt 4.8.6 with Visual Studio 2015 without official support?

From Dev

How clone qt source from git

From Dev

Adding module to existing Qt5 installation from source

From Dev

How do I build libcurl from source?

From Dev

How to build a .deb file for CMake from source?

From Dev

How to build Chameleon bootloader from SVN source?

From Dev

How to build Chromium from source on OpenBSD?

From Dev

How do I build Unity from source?

From Dev

How do I build libcurl from source?

From Dev

Fullcalendar js how to build from source

From Dev

How to build Chameleon bootloader from SVN source?

From Dev

How to build the GDB documentation from source?

From Dev

How to build Firefox from 4.0 source and optimize it?

From Dev

How to build gnuradio without the documentation (from source)

From Dev

Qt5 SSL support

From Dev

Build HikariCP from source

From Dev

Qt5 C++ How do you access items from a model to check state?

From Dev

How to build a QT-project in visual studio from command line

From Dev

Enable C++14 support in CLion?

From Dev

Support of std::cbegin() in C++14

From Dev

Clang 3.3 and C++14 support?

From Dev

Is this a bug in g++ c++14 support?

From Dev

Will C++14 support unconstrained generic functions?

From Dev

C++14 support in QtCreator with Clang

From Dev

ros packages with C++14 lambda support

From Dev

ros packages with C++14 lambda support