[Mono-osx] Embedding Mono in Cocoa Application

Andreas Färber andreas.faerber at web.de
Fri Aug 22 07:50:11 EDT 2008


Hello,

Am 22.08.2008 um 03:09 schrieb David Rivera:

> I have a Cocoa application, in XCode 3, that
> I am trying to embed mono into.  I added the Mono.framework as a
> linked framework, but when I try to import the header files, it can't
> seem to find them.  The instructions I am using are the ones on the
> Embedding Mono page on the mono website.
>
> I have tried many variations of #import <mono/jit/jit.h>, but to no
> avail, XCode still can't seem to find the file.  Has anyone
> successfully embedded mono in a Cocoa app with XCode 3?

Yes, I have. Xcode searches for Mono.framework headers only when you  
do #include <Mono/...> but that doesn't work with Mono's headers. You  
need to add the header paths for Mono and GLib plus those in lib  
(three entries).

And dependending on the GLib version you're using you may need to  
patch a GLib header file to avoid duplicate symbol errors (due to  
messy definitions for inline / always_inline in GLib).

Andreas



More information about the Mono-osx mailing list