Hi David,
The preferred way of fixing this is by correcting the code that #defines
ERROR in the first place. Claiming such a common name as 'ERROR' in
through the preprocessor is quite rude and unnecessary.
For cases where this is not possible log4cpp contains a workaround which
can be enable by #defining LOG4CPP_FIX_ERROR_COLLISSION. On Win32
platforms this is the default (see include/log4cpp/config-win32.h), for
other platforms you need to arrange for it yourself.
Good luck,
Bastiaan Bakker
PS. And yes, Priority.hh mentions a FAQ, but it has not been written
yet.
On Mon, 2002-05-27 at 13:59, David Resnick wrote:
> Hi all,
>
> I'm having problems using log4cpp::Priority::ERROR. When I just include
> priority.hh, I get error messages telling me that ERROR is not defined.
>
> Putting this:
>
> #ifdef ERROR
> #undef ERROR
> #endif
>
> before including priority.hh enables me to compile, but I'm sure there
> is a better way of fixing it (some define?).
>
> In Priority.hh there is mention of a FAQ, but I can't find it.
>
> What is the preferred way of fixing this problem?
>
> Regards,
>
> David Resnick
> MobileSpear Inc.
>
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>
> _______________________________________________
> Log4cpp-devel mailing list
> Log...@li...
> https://lists.sourceforge.net/lists/listinfo/log4cpp-devel
|