[Interest] [Mingw-w64-public] Compiling Qt (4 or 5) with "-std=c++11"

K. Frank kfrank29.c at gmail.com
Thu Mar 21 23:38:21 CET 2013


Hello Etienne!

On Thu, Mar 21, 2013 at 6:11 PM, Etienne Sandré-Chardonnal
<etienne.sandre at m4x.org> wrote:
> 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.

Thank you for the confirmation.  It seems to be shaping up as the
consensus that mixing -std=gnu++11 code with non--std=gnu++11
Qt is legitimate and works.

> 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.

Thanks for the offer, but please don't take the trouble.  I really don't
have an preference for -std=c++11 over -std=gnu++11, and Thiago
has indicated that -std=gnu++11 is the way to go.

> By the way, since you are using mingw-w64, can you debug properly
> applications in QtCreator?

Sorry, I don't know he answer, as I don't use 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.

I have debugged Qt applications with the gdb that came with the gcc
build I used to build Qt and my applications.  Other than some problems
with very slow start-up times, it seems to work.

> Thanks,
> Etienne

I appreciate hearing that this works for you.


K. Frank

>
>> 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"
>>
>> Hello Lists!
>>
>> Should I expect to be able to build Qt with "-std=c++11" using mingw-w64?
>> ...



More information about the Interest mailing list