[Mono-list] Mono embedding issue
robertj at gmx.net
Tue Oct 10 09:00:45 EDT 2006
Andreas Färber wrote:
>>> When embedding Mono 188.8.131.52 on OS X i386, I get an assertion failure
>>> in mono_jit_init:
>>> ** ERROR **: file threads.c: line 420 (mono_thread_attach): assertion
>>> failed: (thread_handle)
>> This basically means that io-layer's GetCurrentThread returned
>> NULL, which is completely nonsense because it always returns
>> a constant value != NULL.
>> I suppose MacOS has its own GetCurrentThread function which gets
>> linked and called instead Mono's:
> I already read that bug report. It refers to _GetCurrentProcess as
> opposed to GetCurrentThread.
Like GetCurrentProcess, GetCurrentThread is actually a Carbon function:
The proof by induction about why GetCurrentThread could fail as well,
is left as an exercise for the reader :-)
As suggested by bug #77324 (2006-03-10 16:38), you could try to
reference the Mono framework before Carbon:
gcc foo.c -framework Mono -framework Carbon -o ...
More information about the Mono-list