Re: Link Cocoa application to CFM library
Re: Link Cocoa application to CFM library
- Subject: Re: Link Cocoa application to CFM library
- From: Finlay Dobbie <email@hidden>
- Date: Thu, 31 Jan 2002 18:46:57 +0000
On Thursday, January 31, 2002, at 05:50 PM, Douglas Davidson wrote:
On Thursday, January 31, 2002, at 07:22 AM, John W. Whitworth wrote:
Is it possible to link a CFM library into a Cocoa application?
You can't link against it, but you can load it and call it at runtime.
CFBundle, for example, will load a bundle whether its executable is CFM
or Mach-o, and will allow you to look up appropriate function
pointers. If your library isn't bundled, you will probably need to use
CFM directly; in this case, you will need to add some glue yourself to
allow you to call into the fragment--since Mach-o code doesn't contain
the CFM cross-fragment call sequence. DTS has some code samples
covering the reverse direction (CFM->Mach-o), which might help...
Omni has some code in OmniFoundation for going the other way, I think
(they need it for calling browser plugins from OmniWeb, probably).
-- Finlay