Skip to content
Advertisement

Qt creator platform codegen flags

Seems Qt creator “platform codegen flags” does not take effect (Tools->Options…->Build&Run->Compillers). Mentioned there “-std=c++11” flag however it was not added to Makefile. Also added g++-5 there – also no effect: CXX = g++ CXXFLAGS = -pipe -g -Wall -W $(DEFINES)

Should be: CXX = g++-5 CXXFLAGS = -pipe -g -Wall -W $(DEFINES) -std=c++11

How to correctly add flags there.

Advertisement

Answer

If you use qmake as build system, then you can add flags to the compiler via QMAKE_CXXFLAGS variable in your .pro file:

QMAKE_CXXFLAGS += -std=c++11

And specify a compiler for C++:

QMAKE_CXX = g++-5

Also you can pass additional arguments to make in the “Projects” tab.

Don’t know what is “platform codegen flags” though.

Advertisement