log4cxx compilation with MinGW
2010-09-10 12:45:37 GMT
|
Hi all, I am managing to compile log4cxx using MinGW. I followed the instructions from here : http://wiki.apache.org/logging-log4cxx/MSWindowsBuildInstructions I am on WinXP, MingGW (with gcc 4.4.1). Everything worked fine until apr (from svn) compiling. When I run ./buildconf, it gave me: $ ./buildconf buildconf: checking installation... buildconf: python version 2.7 (ok) buildconf: autoconf version 2.67 (ok) buildconf: libtool version 1.4e (ok) buildconf: copying libtool helper files using /bin/libtoolize buildconf: Using libtool.m4 at /usr/share/aclocal/libtool.m4. buildconf: creating include/arch/unix/apr_private.h.in ... Prototype mismatch: sub main::error ($;$%) vs ( <at> ) at /usr/lib/perl5/5.6.1/Exporter/Heavy.pm line 174 Exporter::heavy_export('Autom4te::General', 'main') called at /usr/lib/perl5/5.6.1/Exporter.pm line 45 Exporter::import('$debug', '$force', '$help', '$me', '$tmp', '$verbose', '$version', '&backname', ...) called at /bin/autoheader line 46 main::BEGIN() called at /mingw/share/autoconf/Autom4te/General.pm line 46 eval {...} called at /mingw/share/autoconf/Autom4te/General.pm line 46 Prototype mismatch: sub main::find_configure_ac (; <at> ) vs (;$) at /usr/lib/perl5/5.6.1/Exporter/Heavy.pm line 174 Exporter::heavy_export('Autom4te::General', 'main') called at /usr/lib/perl5/5.6.1/Exporter.pm line 45 Exporter::import('$debug', '$force', '$help', '$me', '$tmp', '$verbose', '$version', '&backname', ...) called at /bin/autoheader line 46 main::BEGIN() called at /mingw/share/autoconf/Autom4te/General.pm line 46 eval {...} called at /mingw/share/autoconf/Autom4te/General.pm line 46 Prototype mismatch: sub main::update_file ($$;$) vs ($$) at /usr/lib/perl5/5.6.1/Exporter/Heavy.pm line 174 Exporter::heavy_export('Autom4te::General', 'main') called at /usr/lib/perl5/5.6.1/Exporter.pm line 45 Exporter::import('$debug', '$force', '$help', '$me', '$tmp', '$verbose', '$version', '&backname', ...) called at /bin/autoheader line 46 main::BEGIN() called at /mingw/share/autoconf/Autom4te/General.pm line 46 eval {...} called at /mingw/share/autoconf/Autom4te/General.pm line 46 Prototype mismatch: sub main::xsystem ( <at> ) vs ($) at /usr/lib/perl5/5.6.1/Exporter/Heavy.pm line 174 Exporter::heavy_export('Autom4te::General', 'main') called at /usr/lib/perl5/5.6.1/Exporter.pm line 45 Exporter::import('$debug', '$force', '$help', '$me', '$tmp', '$verbose', '$version', '&backname', ...) called at /bin/autoheader line 46 main::BEGIN() called at /mingw/share/autoconf/Autom4te/General.pm line 46 eval {...} called at /mingw/share/autoconf/Autom4te/General.pm line 46 Too many arguments for Autom4te::General::update_file at /bin/autoheader line 287, near "$force)" Execution of /bin/autoheader aborted due to compilation errors.
Anyone have an idea about this problem ? Since I only need the log4cxx binaries, I tried with the binaries compiled by VS
but they did not work with my project on IDE Code::Blocks. So I am looking
for the compiled binaries using gcc, do you know where I may get them ? Thank you very much for your helps VDung |
rollingfileappender.h
2010-09-15 09:25:03 GMT
Hi all,
I need to configure a RollingFileAppender in the code of the program.
But I see 2 definitions of RollingFileAppender (log4cxx::RollingFileAppender and log4cxx::rolling::RollingFileAppender)
I don't know which definition to use. Do you know why we have 2 different definitions? And which to use?
Re: rollingfileappender.h
2010-09-17 05:07:33 GMT
log4cxx attempts to reproduce the appender set from log4j and log4j has two different RollingFileAppender classes, org.apache.log4j.RollingFileAppender and org.apache.log4j.rolling.RollingFileAppender. The latter was developed on the abandoned log4j 1.3 development branch, is now included in the extras companion to log4j and supports pluggable rollover strategies and triggering strategies. In log4cxx, log4cxx::RollingFileAppender (the analog to org.apache.log4j.RollingFileAppender) is implemented by delegation to log4cxx::rolling::RollingFileAppender (the analog to org.apache.log4j.rolling.RollingFileAppender). log4cxx::rolling::RollingFileAppender is the more general class and should be used unless you are porting configurations that used org.apache.log4j.RollingFileAppender. On Sep 15, 2010, at 4:25 AM, Fabian Jacquet wrote: > Hi all, > > I need to configure a RollingFileAppender in the code of the program. > But I see 2 definitions of RollingFileAppender (log4cxx::RollingFileAppender and log4cxx::rolling::RollingFileAppender) > > I don't know which definition to use. Do you know why we have 2 different definitions? And which to use?
Re: rollingfileappender.h
2010-09-17 09:20:38 GMT
Ok, thanks.
But If I use log4cxx::rolling::RollingFileAppender how can I set the file name and the pattern layout?
If I use log4cxx::RollingFileAppender I can pass it to the constructor.
In the first one I can set the RollingPolicy and the TriggeringPolicy and in the second one, I can set the file name and the pattern layout.
log4cxx attempts to reproduce the appender set from log4j and log4j has two different RollingFileAppender classes, org.apache.log4j.RollingFileAppender and org.apache.log4j.rolling.RollingFileAppender. The latter was developed on the abandoned log4j 1.3 development branch, is now included in the extras companion to log4j and supports pluggable rollover strategies and triggering strategies.
In log4cxx, log4cxx::RollingFileAppender (the analog to org.apache.log4j.RollingFileAppender) is implemented by delegation to log4cxx::rolling::RollingFileAppender (the analog to org.apache.log4j.rolling.RollingFileAppender). log4cxx::rolling::RollingFileAppender is the more general class and should be used unless you are porting configurations that used org.apache.log4j.RollingFileAppender.
On Sep 15, 2010, at 4:25 AM, Fabian Jacquet wrote:
> Hi all,
>
> I need to configure a RollingFileAppender in the code of the program.
> But I see 2 definitions of RollingFileAppender (log4cxx::RollingFileAppender and log4cxx::rolling::RollingFileAppender)
>
> I don't know which definition to use. Do you know why we have 2 different definitions? And which to use?
Problem with build in VS2010=>CStringT type
2010-09-30 14:09:49 GMT
Hi
I have an ATL project in VS2010 and trying to integrate log4cxx to my solution.
When I compiler I get these errors
Error 3 error C2988: unrecognizable template declaration/definition c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 42 1 AlmBtPg
Error 10 error C2988: unrecognizable template declaration/definition c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 56 1 AlmBtPg
Error 7 error C2447: '{' : missing function header (old-style formal list?) c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 50 1 AlmBtPg
Error 14 error C2447: '{' : missing function header (old-style formal list?) c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 64 1 AlmBtPg
Error 2 error C2143: syntax error : missing ';' before '<' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 42 1 AlmBtPg
Error 9 error C2143: syntax error : missing ';' before '<' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 56 1 AlmBtPg
Error 16 error C2143: syntax error : missing ';' before '<' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 70 1 AlmBtPg
Error 6 error C2143: syntax error : missing ';' before '{' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 50 1 AlmBtPg
Error 13 error C2143: syntax error : missing ';' before '{' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 64 1 AlmBtPg
Error 1 error C2143: syntax error : missing ')' before '<' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 42 1 AlmBtPg
Error 8 error C2143: syntax error : missing ')' before '<' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 56 1 AlmBtPg
Error 15 error C2143: syntax error : missing ')' before '<' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 70 1 AlmBtPg
Error 4 error C2059: syntax error : '<' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 42 1 AlmBtPg
Error 11 error C2059: syntax error : '<' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 56 1 AlmBtPg
Error 5 error C2059: syntax error : ')' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 42 1 AlmBtPg
Error 12 error C2059: syntax error : ')' c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 56 1 AlmBtPg
Error 17 error C1903: unable to recover from previous error(s); stopping compilation c:\documents and settings\tr1g3800\my documents\visual studio 2010\projects\comtest\atlserver\almbtpg\import\log4cxx\inc\log4cxx\logger.h 70 1 AlmBtPg
AFAIK CStringT is a built-in type and should not create a problem.
Any ideas?
Regards
With best regards
/ mit freundlichen Grüßen / saygilarimla
Tugrul GUCLU
Corporate Technology, Siemens San. ve Tic. AS
DC CEE I IBT
GOSB Teknopark
Kemal Nehrozoğlu Cad.
2. Hibrit Bina Zemin kat /No:4
Turkey – 41480 Kocaeli
Tel. +90 (216) 459 3185
Fax +90 (216) 459 2042
tugrul.guclu <at> siemens.com
www.siemens.com
RSS Feed