[Interest] How best to turn on "-std=gnu++11" when using qmake to build a project?

Alexandre Pretyman alexandre.pretyman at gmail.com
Wed Apr 17 02:34:48 CEST 2013


Hi!

For each project you can check out out QMAKE_CXXFLAGS and QMAKE_LFLAGS
on http://qt-project.org/doc/qt-5.0/qtdoc/qmake-variable-reference.html

For global I guess you can edit the mkspecs for you compiler

Best regards,

On Tue, Apr 16, 2013 at 7:17 PM, K. Frank <kfrank29.c at gmail.com> wrote:
> Hello List!
>
> When I am using qmake to build a project that uses Qt, what is the best
> way to turn on the compiler flag "-std=gnu++11"?  (I am using a mingw-w64
> build of g++ 4.8.1.)
>
> Ideally, I would like to do this on a "global" basis, and not have to do it for
> each project separately (but that's not essential).
>
> (I had started out by building Qt with "-std=gnu++11", hoping, but not
> testing or otherwise confirming, that "-std=gnu++11" would somehow
> get baked into qmake and end up in the makefiles it generates.  But,
> as detailed in an earlier thread, my current plan is not to configure /
> build Qt with "-std=gnu++11".)
>
> My overall goal is to use c++11 features in my code, including in Qt-based
> projects.  So when my code gets compiled, ultimately driven by the qmake
> system, the "-std=gnu++11" flag needs to be specified on the g++ command
> lines.
>
> Thanks for any suggestions.
>
>
> K. Frank
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



-- 
Alexandre Pretyman



More information about the Interest mailing list