_DEBUG definition
-
Hi, I want to disable some functions in the release build. This is the fucntion:
void func1(...)
{
#ifdef _DEBUG
func2();
#endif //_DEBUG
}I still see the outputs of func2() in the release build. My preprocessor definitions for the release build: WIN32;_CONSOLE;NDEBUG debug build: WIN32;_CONSOLE;_DEBUG I don't understand what is wrong. How can i solve the problem? Any help appreciated. Thanks in advance
-
Hi, I want to disable some functions in the release build. This is the fucntion:
void func1(...)
{
#ifdef _DEBUG
func2();
#endif //_DEBUG
}I still see the outputs of func2() in the release build. My preprocessor definitions for the release build: WIN32;_CONSOLE;NDEBUG debug build: WIN32;_CONSOLE;_DEBUG I don't understand what is wrong. How can i solve the problem? Any help appreciated. Thanks in advance
caykahve wrote: I still see the outputs of func2() in the release build. i don't understand well. does
func2()
execute ? what happens when you explicitely write a#undef _DEBUG
(at the begining of stdafx.h for example) ?
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
caykahve wrote: I still see the outputs of func2() in the release build. i don't understand well. does
func2()
execute ? what happens when you explicitely write a#undef _DEBUG
(at the begining of stdafx.h for example) ?
TOXCCT >>> GEII power
[toxcct][VisualCalc] -
-
I always choose "Rebuild Solution" from build menu. i am using Visual Studio .net 2003 BTW.
-
-
Hi, I want to disable some functions in the release build. This is the fucntion:
void func1(...)
{
#ifdef _DEBUG
func2();
#endif //_DEBUG
}I still see the outputs of func2() in the release build. My preprocessor definitions for the release build: WIN32;_CONSOLE;NDEBUG debug build: WIN32;_CONSOLE;_DEBUG I don't understand what is wrong. How can i solve the problem? Any help appreciated. Thanks in advance
Use the /P compiler switch on this file. It will preprocess the file into a file with a .i extension. Open that file and look for
func1()
. That will let you know if_DEBUG
is being seen by the preprocessor or not.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
-
Hi, I want to disable some functions in the release build. This is the fucntion:
void func1(...)
{
#ifdef _DEBUG
func2();
#endif //_DEBUG
}I still see the outputs of func2() in the release build. My preprocessor definitions for the release build: WIN32;_CONSOLE;NDEBUG debug build: WIN32;_CONSOLE;_DEBUG I don't understand what is wrong. How can i solve the problem? Any help appreciated. Thanks in advance