Re: Uber-Dynamic Linkery
Re: Uber-Dynamic Linkery
- Subject: Re: Uber-Dynamic Linkery
- From: Jonas Maebe <email@hidden>
- Date: Fri, 31 May 2013 15:10:32 +0200
On 31 May 2013, at 06:25, Jerry Krinock wrote:
> My Firefox extension contains a dynamic library that I build in Xcode. It links to a function, NS_GetServiceManager(), which, until Firefox version 22, is defined in libxpcom.dylib, which is one of the dozen or so libraries that Mozilla ships in Firefox. But starting in Firefox 22, the definition of NS_GetServiceManager() got moved to a different library, XUL.
>
> So, if I build *my* dylib linked to libxpcom.dylib, it works OK in Firefox 21 but fails to load in Firefox 22. If I build it linked to XUL, it works OK in Firefox 22, but in Firefox 21, Firefox crashes when NS_GetServiceManager() is invoked.
>
> Is there any kind of linking trickery I could use to build a dylib which will work in both new and old Firefox versions?
Look up the address of the function at run time (e.g. using dlopen/dlsym).
Jonas
_______________________________________________
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