• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange dynamic_cast problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Strange dynamic_cast problem
      • From: Eric Gorr <email@hidden>
    • Re: Strange dynamic_cast problem
      • From: "Chris Suter" <email@hidden>
References: 
 >Strange dynamic_cast problem (From: Eric Gorr <email@hidden>)
 >Re: Strange dynamic_cast problem (From: "Chris Suter" <email@hidden>)

  • Prev by Date: Error in Framework
  • Next by Date: Re: Strange dynamic_cast problem
  • Previous by thread: Re: Strange dynamic_cast problem
  • Next by thread: Re: Strange dynamic_cast problem
  • Index(es):
    • Date
    • Thread