[Mono-devel-list] Missing method in assembly

Vadim B. Guzev vguzev at yandex.ru
Thu Jan 29 13:06:11 EST 2004


Hello, mono-devel-list at lists.ximian.com!


Can someone explain me why the attached example doesn't work?
When I try to do:
   make
   mono TestPInvoke.exe

It throws the following:
8<-----------------------------------------------------------------
** (TestPInvoke.exe:25530): WARNING **: Missing method Test in assembly
TestPInvoke.exe typeref index 2

Unhandled Exception: System.NullReferenceException: A null value was found
where an object instance was required
in (unmanaged) /usr/local/lib/libmono.so.0 [0x40036f81]
in (unmanaged) /usr/local/lib/libmono.so.0 [0x400455c0]
in (unmanaged) /usr/local/lib/libmono.so.0 [0x40045fce]
in (unmanaged) /usr/local/lib/libmono.so.0 [0x400461dc]
in (unmanaged) /usr/local/lib/libmono.so.0(mono_compile_method+0x4d)
[0x4008364d]
in (unmanaged) /usr/local/lib/libmono.so.0 [0x4002f765]
in <0x00028> (wrapper managed-to-native)
System.Object:__icall_wrapper_mono_ldftn (intptr)
8<-----------------------------------------------------------------

This example works properly in MS VS.
I use Mono 0.29 on Linux.


Best regards,
Vadim B. Guzev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 109 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040129/043f02b0/attachment.obj 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mcsharp.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040129/043f02b0/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TestPInvoke.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040129/043f02b0/attachment-0001.pl 


More information about the Mono-devel-list mailing list