Logged In: NO

I have absolutely the same error.
Development environment: MinGW-gcc 3.4.4 (generaly hand-
made, based on MinGW-3.2.0-rc-3 + MSYS-1.0.11-2004.04.30-1 +
msysDTK-1.0.1 + gcc-*-3.4.4-20050522 + binutils-2.16.91-
20050827-1 + make 3.79.1 + Msys Developer + ...)

I managed to compile library, using some quick hacks:

<path>/log4cpp-0.3.5rc3/include/log4cpp/Manipulator.hh :

My compiler dislikes last semicolon in the file... Semicolon
removed

27: friend LOG4CPP_EXPORT std::ostream& operator<< (std::
ostream& os, const tab& w);
28: };
29: } //<= here was semicolon
30: #endif

<path>/log4cpp-0.3.5rc3/include/log4cpp/CategorStream.hh:

It looks like MinGW do not (at least easily) supports wide
streams, so "wostringstream" is absent, so I commented out
corresponding lines in CategorStream.hh

//101: template<typename T> CategoryStream&
operator<<(const std::wstring& t) {
// if (getPriority() != Priority::NOTSET) {
// if (!_wbuffer) {
// if (!(_wbuffer = new std::
wostringstream)) {
// // XXX help help help
// }
// }
// (*_wbuffer) << t;
// }
// return *this;
// }
<* skipped *>
//113: std::wostringstream* _wbuffer;
<* skipped *>

<path>/log4cpp-0.3.5rc3/include/log4cpp/
RemoteSyslogAppender.hh :

Superfluous commas in lines 36 and 61

typedef enum {
LOG_EMERG = 0, ///< system is unusable
LOG_ALERT = 1, ///< action must be taken
immediately
LOG_CRIT = 2, ///< critical conditions
LOG_ERR = 3, ///< error conditions
LOG_WARNING = 4, ///< warning conditions
LOG_NOTICE = 5, ///< normal but significant
condition
LOG_INFO = 6, ///< informational
LOG_DEBUG = 7 //<= here was a comma (line36, can
it be compilled at all, using any compiler???? ) ///<
debug-level messages
} SyslogLevel;
<* skipped *>
LOG_LOCAL7 = (23<<3) //<= here was a comma ///<
reserved for local use
} SyslogFacility;

And, because portability system, icluding Portability.hh is
not aware about MinGW, I had to add definition of in_addr_t
(just a hack):

#ifdef WIN32
#include <winsock2.h>
+typedef unsigned long in_addr_t;
#else

<path>/log4cpp-0.3.5rc3/include/log4cpp/Priority.hh:

The same problem and the same hack

#include <log4cpp/Portability.hh>
+#ifdef WIN32
+#ifndef LOG4CPP_FIX_ERROR_COLLISION
+#define LOG4CPP_FIX_ERROR_COLLISION 1
+#endif
+#endif
#include <string>
#include <stdexcept>

It looks like portability system needs some redesign to
include MinGW, without disrupting build process and so on
for other platforms (my modifications almost certainly do
it) .

Then

./configure
make

Compilation of tests/Clock.cpp fails because "gettimeofday"
is used without looking in with config.h (It does not check
LOG4CPP_HAVE_GETTIMEOFDAY)

make install

That was enough for me to compile adn install the library.

Best regards, Indrekis

indrekis at icmp.lviv.ua

PS. Please excuse my English...