disable qDebug in Visual Studio Release Version
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
Re: disable qDebug in Visual Studio Release Version
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.
Re: disable qDebug in Visual Studio Release Version
Why would you want something clearly used for debuggin in your release build? Just remove them.
Re: disable qDebug in Visual Studio Release Version
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
Re: disable qDebug in Visual Studio Release Version
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.