logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: MESSAGEBUFFER.H COMPILATION PROBELM
Date Thu, 12 Jun 2008 05:32:11 GMT

On Jun 11, 2008, at 6:46 AM, srkraju wrote:

> While trying to compiling the sample program im getting the  
> following error message
> (USING LOG4CXX_0.10.0, G++ VERSION 2.96,  REDHAT LINUX VERSION AS3)
>
> In file included from /home/srkraju/Test/Log4Cxx/apache- 
> log4cxx-0.10.0/src/main/include/log4cxx/logger.h:32,
>                  from bar.h:2,
>                  from bar.cpp:1:
> /home/srkraju/Test/Log4Cxx/apache-log4cxx-0.10.0/src/main/include/ 
> log4cxx/helpers/messagebuffer.h:30: syntax
> error before `&'
...
>
> thanks& regards
> srkraju
>

I haven't tested with gcc 2.x.  In all the existing STL  
implementations that have been reported, sstream includes a definition  
for std::ios_base.  However, std::ios_base is definitely defined by  
ios and maybe that file needs to be explicitly included in  
messagebuffer.h.  Could you try adding

#include <log4cxx/log4cxx.h>
#include <log4cxx/logstring.h>
+#include <ios>
#include <sstream>

and report if that resolves the issue.  Otherwise, you should track  
down if and where std::ios_base is defined in your compilers header  
library.

Alternatively, you could try to forward define std::ios_base,  
something like:

#include <log4cxx/log4cxx.h>
#include <log4cxx/logstring.h>
#include <sstream>
+
+namespace std { class ios_base; }


Did "make" succeed?  How aboue "make check"?

Mime
View raw message