• 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: C++ name collisions between plugins
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ name collisions between plugins


  • Subject: Re: C++ name collisions between plugins
  • From: Ben Syverson <email@hidden>
  • Date: Thu, 15 Aug 2013 09:29:34 -0500

C++ or Objective C? The Obj C runtime doesn't (can't) distinguish between two classes with the same name, so it's problematic for plugins.

Now I just prefix every class with the reverse domain, product and version number, like this:
ComBenSyversonMattebox2Render

It's sort of absurd, but it's the only solution to completely avoid collisions.

Ben


On Aug 15, 2013, at 9:17 , Paul Miller <email@hidden> wrote:

> I think this was discussed before, but I can't find the thread.
>
> I have an older plugin with a certain implementation of class Foo.
> I have a newer plugin with a different implementation of class Foo.
>
> In compiler settings of BOTH plugins I have:
>
> Symbols Hidden By Default: ON
> Inline Methods Hidden: ON
> (Intel) Default Symbol Visibility: Hidden (-fvisibilty=hidden)
>
> Yet, my code will randomly jump between implementations of Foo if both plugins are installed.
>
> Aside from renaming every class or putting them in different namespaces, is there any other way around this?
>
> I'm running in the debugger in this case. Does that have an effect on it?
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Pro-apps-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: C++ name collisions between plugins
      • From: Paul Miller <email@hidden>
References: 
 >C++ name collisions between plugins (From: Paul Miller <email@hidden>)

  • Prev by Date: C++ name collisions between plugins
  • Next by Date: Re: C++ name collisions between plugins
  • Previous by thread: C++ name collisions between plugins
  • Next by thread: Re: C++ name collisions between plugins
  • Index(es):
    • Date
    • Thread