You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Alex Raimondi <al...@miromico.ch> on 2005/08/31 09:31:49 UTC

subclass HTMLLayout

Hi

I tried to subclass class HTMLLayout, but I get a lot of strange linking 
errors.

Has someone ever done this? Is some sample code available?

Thanks a lot

Alex


Re: subclass HTMLLayout

Posted by Andreas Fester <An...@gmx.de>.
Hi,

Alex Raimondi wrote:
[...]
> To reply to your mail I wanted to reproduce the linker error and hit a 
> line I forgot to change...
> 
> IMPLEMENT_LOG4CXX_OBJECT(...)
Ok, so I suspect that you got some "duplicate symbol" errors from the
linker then.

> What ever this macro does, after correcting the parameter everything was 
> fine.

The macro creates some skeleton for a class with specific functions
which exist in java but are hard to code in C++, especially registration
of the class with a "class loader" to dynamically instanciate the class
later by name (which is necessary because many classes are configured
by name in the .properties or .xml configuration file, for example the
appenders).

> Is there some documentation about these macros?
$ vi include/log4cxx/helpers/object.h ;-)

Best Regards,

	Andreas

-- 
Andreas Fester
mailto:andreas@littletux.net
WWW: http://www.littletux.net
ICQ: 326674288

Re: subclass HTMLLayout

Posted by Alex Raimondi <al...@miromico.ch>.
Hi,

Thanks for your help.


Andreas Fester wrote:

>>
>> I tried to subclass class HTMLLayout, but I get a lot of strange 
>> linking errors.
>
>
> - Which log4cxx version are you using (0.9.7 or 0.9.8)?
> - *What are* the linker errors?
>
When creating the subclass i copied htmllayout.h and .cpp from log4cxx 
(0.9.8) and changed it.

To reply to your mail I wanted to reproduce the linker error and hit a 
line I forgot to change...

IMPLEMENT_LOG4CXX_OBJECT(...)

What ever this macro does, after correcting the parameter everything was 
fine.

Is there some documentation about these macros?

thanks a lot

best regards

Alex



Re: subclass HTMLLayout

Posted by Andreas Fester <An...@gmx.de>.
Hi,

Alex Raimondi wrote:
> Hi
> 
> I tried to subclass class HTMLLayout, but I get a lot of strange linking 
> errors.

- Which log4cxx version are you using (0.9.7 or 0.9.8)?
- *What are* the linker errors?

Best Regards,

	Andreas

-- 
Andreas Fester
mailto:andreas@littletux.net
WWW: http://www.littletux.net
ICQ: 326674288