I would agree with you that plug-ins shouldn't do that if it was not a plugin framework that was going to be opened up to 3rd party developers or if its code shared between the application and the plug-ins. I have no control over what frameworks developers use to write plug-ins for my app. Two developers may write two different plug-ins who both use the same framework.
On Tue, May 4, 2010 at 1:55 PM, Kyle Sluder <kyle.slu...@gmail.com> wrote: > On Tue, May 4, 2010 at 10:22 AM, Carmen Cerino Jr. <ccerin...@gmail.com> > wrote: > > I am currently writing a plug-in framework for my application. I would > like > > to be able to release plugins without having to update my application, > and I > > intend on making the framework available for third party plugins. I am > > currently running into issues when two plugins ship with identical > > frameworks. When the plugins are loaded the runtime gets confused because > > the framework gets loaded twice. What is the best way to mitigate this > > issue? > > Plugins need to not do that. If they share a framework, that framework > needs to be part of the app bundle rather than the plugin. If they are > two unrelated plugins that happen to use the same library, then they > need to compile that framework in such a way that the symbols don't > conflict. > > We have a few similar scenarios. We define a macro like > PLUGIN_NAME=FooPlugin and all of our headers are written like this: > > // Warning: written in compose window > #define PLUGIN_SYMBOL_NAME(sym) PLUGIN_NAME##sym > > @interface PLUGIN_SYMBOL_NAME(CommonClass) : NSObject > { ... } > > --Kyle Sluder > -- Carmen C. Cerino University of Akron ACM Chapter President University of Akron Aux. Services Student Assistant Cell: 440.263.5057 AIM: UAcodeweaver [ I <3 MACs ] _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com