[Mono-devel-list] Using embedded Mono from Mozilla XPCOM

Boyd Timothy boyd at timothy.ws
Thu Jun 3 13:58:55 EDT 2004


Adding the `pkg-config` line did the trick.  The part that I'm stuck on
now is that the mono_jit_init (path-to-my-dll) is returning errors once
I'm running Mozilla and my XPCOM module is running.  I get the following
error:

** CRITICAL **: file assembly.c: line 583 (mono_assembly_open):
assertion `filename != NULL' failed

After getting this error, Mozilla exits.

Anyone have an idea on this?

-Boyd

On Wed, 2004-06-02 at 18:46, Jonathan Pryor wrote:
> On Wed, 2004-06-02 at 19:03, Boyd Timothy wrote:
> <snip/>
> > The errors I get start out saying that it can't find "glib.h" and then
> > it ends up having loads of "parse errors" while parsing through the Mono
> > header files.
> 
> I'd guess that you don't have the include directories for GLib in your
> compile line.  When compiling and linking, you should use the output of
> ``pkg-config --libs --cflags mono'' in your compile/link line, so that
> the appropriate compiler flags are used:
> 
> 	gcc -o my-app my-app.c `pkg-config --cflags --libs mono`
> 
> Notice the backticks '`'.  This will add all required include paths
> (such as /usr/lib/glib-2.0/include) and libraries (-lmono, -lglib-2.0,
> etc), permitting both compilation and linking of the final app.
> 
> You may encounter other errors dealing with conflicting Win32 symbols,
> such as GetSystemInfo(), GetLastError(), CloseHandle(), etc.  These
> errors are because mono uses a Win32 subset as it's portability layer;
> the headers are in $prefix/include/mono/io-layer.  If at all possible,
> keep these io-layer headers separate from anything that could conflict
> with Win32 symbols.
> 
>  - Jon
> 




More information about the Mono-devel-list mailing list