• 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: RTTI and exceptions between plugins (solution)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RTTI and exceptions between plugins (solution)


  • Subject: Re: RTTI and exceptions between plugins (solution)
  • From: "Peter O'Gorman" <email@hidden>
  • Date: Wed, 03 May 2006 21:54:45 +0900

On Wed, 2006-05-03 at 13:36 +0100, Steve Baxter wrote:
> Hi,
>
> I've found a bit of a problem with my solution below.
>
> On 10.4.6, this all works fine - dlopen( RTLD_GLOBAL ) loads my
> plugins and correctly fixes up all the RTTI information etc. so that
> the one definition rule is obeyed.
>
> On 10.3.9 however, dlopen( RTLD_GLOBAL ) does not fix up the plugins
> correctly - modules end up with different RTTI typeid() addresses for
> the same types (which then causes dynamic_cast to fail).
>
> Does anyone know what could be going on here?  I know dlopen() was
> completely changed for Tiger, but surely the behaviour isn't that
> broken in Panther?!

I wouldn't bet on that :/

Things to check on panther - is your plugin a bundle or dylib? If dylib,
is it linked with -single_module? Is it actually being bound by the
dynamic linker?

If your plugins are bundles - try with -single_module dylibs, if dylibs,
try bundles.

If all that fails, go back to bundles and use the NSModule api yourself
rather than dlopen(). On panther, dlopen( RTLD_GLOBAL) actually opens
with the PRIVATE option and then calls an undocumented routine to make
it global. You may have better luck opening them globally in the first
place.

Hope this helps,
Peter

Attachment: signature.asc
Description: This is a digitally signed message part

 _______________________________________________
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: RTTI and exceptions between plugins (solution)
      • From: Steve Baxter <email@hidden>
References: 
 >Re: RTTI and exceptions between plugins (solution) (From: Steve Baxter <email@hidden>)

  • Prev by Date: Re: RTTI and exceptions between plugins (solution)
  • Next by Date: Help : Debugging 3rd party plugin via XCode 2.2.1
  • Previous by thread: Re: RTTI and exceptions between plugins (solution)
  • Next by thread: Re: RTTI and exceptions between plugins (solution)
  • Index(es):
    • Date
    • Thread