H
hobbes_7_8
Hi everybody!
This is basically a pre-processor doubt. I have this very simple
define:
#ifdef NDEBUG
#define QTRACE //
#else
#define QTRACE qDebug()
#endif
.... so that the line:
QTRACE << "Foi lido o valor" << *it;
.... is expanded to:
qDebug() << "Foi lido o valor" << *it;
.... in debug mode, and is expanded to:
// << "Foi lido o valor" << *it;
.... in release mode. Unfortunately compilation yields:
main.cpp(17) : error C2143: syntax error : missing ';' before '<<'
.... Meaning the pre-processor expanded the macro to absolutely nothing
Does anyone know a way to overcome this? I'm developing this on
Visual Studio .NET 2003 but it will run on a HP-UX system, so I can't
rely on any Microsoft extension.
Thanks in advance,
André
This is basically a pre-processor doubt. I have this very simple
define:
#ifdef NDEBUG
#define QTRACE //
#else
#define QTRACE qDebug()
#endif
.... so that the line:
QTRACE << "Foi lido o valor" << *it;
.... is expanded to:
qDebug() << "Foi lido o valor" << *it;
.... in debug mode, and is expanded to:
// << "Foi lido o valor" << *it;
.... in release mode. Unfortunately compilation yields:
main.cpp(17) : error C2143: syntax error : missing ';' before '<<'
.... Meaning the pre-processor expanded the macro to absolutely nothing
Does anyone know a way to overcome this? I'm developing this on
Visual Studio .NET 2003 but it will run on a HP-UX system, so I can't
rely on any Microsoft extension.
Thanks in advance,
André