From: David R. <dre...@mo...> - 2002-05-30 08:01:32
|
Thanks for the tips! (This one, and that from Aaron) Obviously, including "Portability.hh" before "Priority.hh" did the trick -- on 1 occasion.=20 In a different spot it didn't, but then #define NOGDI solved the problem. David Resnick -----Original Message----- From: Bastiaan Bakker [mailto:bas...@li...]=20 Sent: Tuesday, May 28, 2002 23:57 To: David Resnick Cc: log...@li... Subject: Re: [Log4cpp-devel] ERROR collision on win32 Hi David,=20 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.=20 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. =20 On Mon, 2002-05-27 at 13:59, David Resnick wrote: > Hi all, >=20 > 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. >=20 > Putting this:=20 >=20 > #ifdef ERROR > #undef ERROR > #endif >=20 > before including priority.hh enables me to compile, but I'm sure there > is a better way of fixing it (some define?).=20 >=20 > In Priority.hh there is mention of a FAQ, but I can't find it. >=20 > What is the preferred way of fixing this problem? >=20 > Regards,=20 >=20 > David Resnick=20 > MobileSpear Inc.=20 >=20 >=20 > _______________________________________________________________ >=20 > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm >=20 > _______________________________________________ > Log4cpp-devel mailing list > Log...@li... > https://lists.sourceforge.net/lists/listinfo/log4cpp-devel |