[Mono-list] managed C / C++ dll
Paolo Molaro
lupus@ximian.com
Sat, 15 Feb 2003 12:01:15 +0100
On 02/14/03 carsten@hess.net wrote:
> A simpel test program later I tried loading the dll
> into Mono and I get a runtime error.
>
> The error message is:
>
> "Implement me 1b."
>
>
> I tracked this error message down to file
> class.c, line 1336.
>
> It seems that the case statement there doesn't handle
> and hence the error.
>
> MONO_TYPE_FNPTR = 0x1b
The assembly uses function pointer types. This doesn't happen with
normal code, so it's still unimplemented in mono.
> I then also read a little source code to figure out how
> this should look like but without a little help on how
> the mono system works down there I think I am stuck.
If you want to get your hands dirty with this stuff, you may have a look
at how MONO_TYPE_PTR is handled in class.c and in other places,
MONO_TYPE_FNPTR should be handled in a similar way.
> Is the fix hard or can you provide a few lines
> explanation so that I understand what is going on here.
> If I can I help fix it ... or I can send sample dlls
> whichever you want.
Please file a bug in bugzilla.ximian.com and attach a sample dll there
(best if with source code and instructions on compiling it with the
command-line tool).
> P.S.: After hacking a Microsoft.VisualC.dll myself I
> noticed that you already have one in the in release
> version 0.15 for Windows. I can't find it though in the
> cvs or the linux distribution. Is there a reason? If
> you need source code, I have some / most of the classes
> in my hack and could give you the sources (lots of
> empty classes, no rocket sience here) - just let me
> know :)
The Microsoft.VisualC was probably not included in cvs for some reason
(lazyness, maybe?). So, if you want to contribute that code for
inclusion you're welcome! You may have a look at the mcs source tarball
or the mcs cvs module to see how other assemblies are integrated in the
build process.
Thansk!
lupus
--
-----------------------------------------------------------------
lupus@debian.org debian/rules
lupus@ximian.com Monkeys do it better