Re: Strange dynamic_cast problem
Re: Strange dynamic_cast problem
- Subject: Re: Strange dynamic_cast problem
- From: Eric Gorr <email@hidden>
- Date: Tue, 4 Nov 2008 07:10:17 -0500
On Nov 3, 2008, at 10:20 PM, Chris Suter wrote:
On Tue, Nov 4, 2008 at 9:09 AM, Eric Gorr <email@hidden>
wrote:
I have a strange problem with a dynamic_cast.
I have put together a simple test project which can be found at:
http://ericgorr.net/LibraryLoading.zip
which demonstrates the problem.
I think you've hit a common problem with loading libraries at runtime
which is: by providing a definition of A and B's destructors in the
shared header, the compiler puts a copy of these, the virtual table
and the RTTI in each of the libraries so that when you load them,
there are two copies floating about and that confuses dynamic_cast.
Well, if I comment out the destructors, the same behavior in all cases
occurs.
So, it seems that the cause is elsewhere, unless I have misinterpreted
your comments.
Thanks for your suggested solutions. I will check them out.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden