View Full Version : disable qDebug in Visual Studio Release Version
tranthudo
6th November 2012, 05:38
Hi,
I'm wanna disable all qDebug output in my release version, not in Debug version.
I found that for QtCreator, we can use QT_NO_DEBUG_OUTPUT in .pro file but in Visual Studio 2010,
I could not find any right place to put this??
Anyone know? I'm using Qt 4.8 with visual studio Add in
ChrisW67
6th November 2012, 22:16
It goes wherever the IDE allow you to inject #defines into the command line. That's the DEFINES variable in a Qt pro file and "Project Settings -> C/C++ -> Preprocessor -> Preprocessor definitions" under VS 2005. Try hunting around in 2010 for the same thing. I imagine putting it in the pro file and reimporting it into VS will also do it.
alitoh
7th November 2012, 17:47
Why would you want something clearly used for debuggin in your release build? Just remove them.
ChrisW67
7th November 2012, 23:25
That is precisely what the pre-processor define does... removes them from the release build while maintaining their utility in a debug build from the same source. Warning and Debugging Messages
tranthudo
8th November 2012, 04:31
Thanks ChrisW67 it help so much.
@alitoh: I don't wanna do a lot of these debug lines removal, because I wanna use it latter when I have to debug again.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.