[Mono-list] GLib Critical Error at attemting to embed Mono (and other minor troubles).
robertj at gmx.net
Sun Aug 23 16:54:32 EDT 2009
> I got an assertion error on mono_jit_exec. The console output an error from
> (right-click: show image to view it fullsize)
Are you calling mono_set_dirs ()? If yes, post the code.
> More than this errors, I had many troubles at embeding Mono.
> The first is about linking to a library: mono_domain_assembly_open(domain,
> file) don't work if the mscorlib.dll library file is not located to
> "../lib/mono/1.0/mscorlib.dll" (relative to the main exe). I made a copy of
> this dll to the path but I don't know how to put it on the same folder than
> the exe (or use this dll as static). In fact, I don't really know what to do
> with this dll. If my memory is good, it's the main dll of .NET langage.
The assembly must be placed in $libdir/mono/x.x/, where $libdir
is the directory you've passed to mono_set_dirs ().
> The second is about understanding why compiler can't recognize
> mono_config_parse() but I finally found it in mono-config.h (which is not
> in sample ).
So this is solved.
> The third is why is mscorlib.dll in "mono/1.0/". Does it means I try to
> embed Mono1.0 instead of 2.0 (or 2.4)?
Yes. This is because you've compiled the assembly with mcs. If you
want .NET 2.0, you must use gmcs.
> The last is why the path of my file must be absolute and not relative? If I
> do relative, the assembly var is = 0. Can't I just call with
> "helloworld.exe" (or "./helloworld.exe")?
I don't understand this sentence. You seem to be speaking about
some source code you didn't share with us.
More information about the Mono-list