[Interest] Use Qt release DLLs while debugging application

Gunnar Roth gunnar.roth at gmx.de
Tue Apr 24 21:57:23 CEST 2018


I would recommend setting the /Zo option for enhanced debugging 
information
in your application release build.  ( is default in vs 2017).
Alternatively you can change disable your optimisation in release build 
with /Od.

you CANNOT use a qt application debug build with Qt realease dlls, 
because that will crash , due to using a mix of release and debug 
c-runtime dlls, which have different memory allocators. The debug c 
runtime will allocate extra bytes for debugging purposes, which the 
release allocator does not know of. So it crashes if you allocate with 
the debug allocator and delete with the release allocator or vice versa.

Regards,
Gunnar Roth



------ Original Message ------
From: "Hamish Moffatt" <hamish at risingsoftware.com>
To: "interest at qt-project.org" <interest at qt-project.org>
Sent: 24/04/2018 07:34:20
Subject: [Interest] Use Qt release DLLs while debugging application

>This must be an FAQ, but can I use the Qt release mode DLLs while 
>running my application compiled for debug? (In Visual Studio 2015, Qt 
>5.8).
>
>I looked through the mkspecs and it doesn't seem possible. The 
>qtPlatformTargetSuffix function defined in qt_functions.prf always adds 
>the d suffix when compiling for debug.
>
>
>I ask because I'm not debugging Qt, and the XML parsing in Qt5Xml seems 
>to be horrendously slow in debug mode. It's using 45% of my total CPU 
>time, versus 11% in release mode. I'm not actively debugging anything 
>remotely related to XML but this is killing debug time for me.
>
>
>Hamish
>
>_______________________________________________
>Interest mailing list
>Interest at qt-project.org
>http://lists.qt-project.org/mailman/listinfo/interest




More information about the Interest mailing list