You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Curt Arnold <ca...@apache.org> on 2005/03/15 23:15:01 UTC

Re: Build namespace issues

On Mar 15, 2005, at 3:31 PM, Ron Ohmer wrote:

> I ran into a rather odd error when using SocketAppenders.
>  
> I have a wrapper that has worked fine, no warnings, nothing until I 
> added functionality for the SocketAppender..
>  
> Now I get what follows this..  Does anyone know the root of this 
> (Other than SocketAppender.cpp.. :-))   BTW, VS.NET 2k3 is the build 
> tool.
>

The problem is that pervasively throughout log4cxx (even the CVS HEAD), 
you see a construct like:

		class SocketImpl;
		typedef helpers::ObjectPtrT<SocketImpl> SocketImplPtr;

When one of these smart-pointer templates is used in a publicly exposed 
method on a exported class, you end up with an exported method 
depending on a non-exported class.  If the template expansion differs 
in any way from the expansion when the library was build, bad things 
will happen hence the warning.

What should be done is something like:

               class SocketImpl;
               class LOG4CXX_EXPORT SocketImplPtr : public 
helpers::ObjectPtrT<SocketImpl> {
                    ...
               }

I'll log this as a bug and work on it as soon I finish my current task 
(likely 24-48 hours away).



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Build namespace issues

Posted by Curt Arnold <ca...@houston.rr.com>.
On Mar 15, 2005, at 5:04 PM, Andy McBride wrote:

> Wow, I hope this makes sense to somebody.
>
> Personally I wouldn’t know if my template expansion was different to my
> library build expansion!
>
> Perhaps this reply was intended to log4cxx userlist instead?
>
> :-)
>

Sorry, yes wrong list.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


RE: Build namespace issues

Posted by Andy McBride <an...@dsl.pipex.com>.
Wow, I hope this makes sense to somebody.

Personally I wouldn’t know if my template expansion was different to my
library build expansion!

Perhaps this reply was intended to log4cxx userlist instead?

:-)

> -----Original Message-----
> From: Curt Arnold [mailto:carnold@apache.org]
> Sent: 15 March 2005 22:15
> To: Log4J Users List
> Subject: Re: Build namespace issues
> 
> On Mar 15, 2005, at 3:31 PM, Ron Ohmer wrote:
> 
> > I ran into a rather odd error when using SocketAppenders.
> >
> > I have a wrapper that has worked fine, no warnings, nothing until I
> > added functionality for the SocketAppender..
> >
> > Now I get what follows this..  Does anyone know the root of this
> > (Other than SocketAppender.cpp.. :-))   BTW, VS.NET 2k3 is the build
> > tool.
> >
> 
> The problem is that pervasively throughout log4cxx (even the CVS HEAD),
> you see a construct like:
> 
> 		class SocketImpl;
> 		typedef helpers::ObjectPtrT<SocketImpl> SocketImplPtr;
> 
> When one of these smart-pointer templates is used in a publicly exposed
> method on a exported class, you end up with an exported method
> depending on a non-exported class.  If the template expansion differs
> in any way from the expansion when the library was build, bad things
> will happen hence the warning.
> 
> What should be done is something like:
> 
>                class SocketImpl;
>                class LOG4CXX_EXPORT SocketImplPtr : public
> helpers::ObjectPtrT<SocketImpl> {
>                     ...
>                }
> 
> I'll log this as a bug and work on it as soon I finish my current task
> (likely 24-48 hours away).
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org