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: Apache Log4cxx build fails with gcc 2.95.3 under Solaris 8
Date Tue, 01 Feb 2005 06:29:35 GMT
std::wcout is the wchar_t equivalent of std::cout, a STL stream 
interface to the standard console.  On other gccs, the definition for 
std::wcout is in <iostream>.  Either the definition of std::wcout is 
located in a different header or may not be defined for the platform.  
Either of which is surprising.  Do a search on your standard include 
files for wcout and see if you come up with any hits.  As a work-around 
until we get a better resolution, you can either remove ConsoleAppender 
from your build or make the following changes which will use std::cout. 
  This is not a good solution since it will cause characters that can 
not be converted to the current code page to be displayed as a 
replacement character.

void ConsoleAppender::subAppend(const LogString& msg, Pool& p) {
  -       std::wstring wmsg;
  +      std::string wmsg;
         log4cxx::helpers::Transcoder::encode(msg, wmsg);
         if (useErr) {
-          std::wcerr << wmsg << std::flush;
+          std::cerr << wmsg << std::flush;
         } else {
-          std::wcout << wmsg << std::flush;
+          std::cout << wmsg << std::flush;
         }
}


On Jan 31, 2005, at 11:59 PM, Ambarish Mitra wrote:

> I have now upgraded gcc, and now I am using gcc 3.3.2
>
> Those errors (reported in the earlier post) dated Jan 31, 2005 have 
> gone,
> but now, some other errors are coming:
>
> source='consoleappender.cpp' object='consoleappender.lo' libtool=yes \
> DEPDIR=.deps depmode=gcc /bin/bash ../depcomp \
> /bin/bash ../libtool --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H  -I. 
> -I.
> -I../include/log4cxx -I../include  -D_REENTRANT   -g -O2 -c -o
> consoleappender.lo consoleappender.cpp
>  g++ -DHAVE_CONFIG_H -I. -I. -I../include/log4cxx -I../include 
> -D_REENTRANT
> -g -O2 -c consoleappender.cpp -Wp,-MD,.deps/consoleappender.TPlo  -fPIC
> -DPIC -o .libs/consoleappender.o
> consoleappender.cpp: In constructor `
>    log4cxx::ConsoleAppender::ConsoleAppender()':
> consoleappender.cpp:33: error: `wcout' undeclared in namespace `std'
> ....
>
> Has anybody faced any similar errors? Or anyone has any idea what can 
> be
> wrong?
>
> -Ambarish.
> <winmail.dat>


Mime
View raw message