[Interest] [Mingw-w64-public] Compiling Qt (4 or 5) with "-std=c++11"
Etienne Sandré-Chardonnal
etienne.sandre at m4x.org
Thu Mar 21 23:11:22 CET 2013
I confirm that compiling a Qt application with -std=gnu++11 while Qt
was compiled without, works perfectly. This doesn't break the abi. I'm
also using rubenvb mingw-w64.
I could not compile with -std=c++11 as I have math constants such as
M_PI in many places, but if you really like to, I can do the test. If
I understand right, std-c++11 is just strictly standard compliant
while -std-gnu++11 is more backward-compatible and has the same
interesting features (but maybe allows less portable code, for
instance with MSVC2012?)
By the way, since you are using mingw-w64, can you debug properly
applications in QtCreator? When I debug programs, the call stack is
empty, while I still can see locals, and when I step out a function,
the debugger often crashes. I have no such problems with the mingw32
shipped with Qt.
Thanks,
Etienne
> Date: Thu, 21 Mar 2013 16:52:29 -0400
> From: "K. Frank" <kfrank29.c at gmail.com>
> Subject: [Interest] [Mingw-w64-public] Compiling Qt (4 or 5) with
> "-std=c++11"
> To: Qt-interest <interest at qt-project.org>, mingw64
> <mingw-w64-public at lists.sourceforge.net>
> Message-ID:
> <CAKEnbTMJ_YoaadThRveSdgw9yGAninFZ54bREBkQHrVJoOV0LA at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello Lists!
>
> Should I expect to be able to build Qt with "-std=c++11" using mingw-w64?
>
> I am considering upgrading the compiler and libraries I use with the specific
> goal of using "-std=c++11" in order to take advantage of the new c++ features.
> (I am hoping to upgrade from gcc 4.7 to gcc 4.8 at the same time.)
>
> As I understand it, using "-std=c++11" causes abi breakage, so to do this, I
> will have to recompile the various libraries I use.
>
> I have been using one of Ruben's 4.7 std::thread-enabled builds with Qt 4 with
> good success (but not with "-std=c++11" turned on). If it makes sense, I would
> take this opportunity to upgrade to Qt 5, but I don't view that as essential.
>
> Has anyone built Qt with either gcc 4.7 or 4.8 with "-std=c++11" activated?
> I've asked about the pros and cons of Qt 4 vs. Qt 5 in a separate post, but
> would welcome comments on whether Qt 4 and 5 interact differently with
> "-std=++11". (I also use qwt, currently version 6.0.1, but will ask about that
> in particular in a separate post.)
>
> Thanks in advance for any advice.
>
>
> K. Frank
>
More information about the Interest
mailing list