Re: Link Cocoa application to CFM library
Re: Link Cocoa application to CFM library
- Subject: Re: Link Cocoa application to CFM library
- From: Douglas Davidson <email@hidden>
- Date: Thu, 31 Jan 2002 09:50:52 -0800
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...
Douglas Davidson