[Mono-list] Native libraries (interop): invalid IL code
Frank Hrebabetzky
hreba at terra.com.br
Thu Nov 22 19:38:23 EST 2007
In order to access some functions of GSL (gnu scientific libraries) I
wrapped them in a small C program and compiled it with gcc into a native
.so library. To test it, I wrote another C program which calls it and it
works fine. But when I try to call the library from Mono/csharp through
DllImport I get the following error during runtime:
-----------------------------------------------------------------------
Unhandled Exception: System.InvalidProgramException: Invalid IL code in
(wrapper native-to-managed) ODES.Solver:CallDiffSys
(double,intptr,intptr,double&): IL_0046: call 0x00000008
at <0x00000> <unknown method>
at (wrapper managed-to-native)
System.Object:__icall_wrapper_mono_delegate_to_ftnptr (object)
at (wrapper managed-to-native) ODES.Solver:NewOdes
(ODES.Solver/FuncGSL,int,double&,int,double,double)
at ODES.Solver..ctor (ODES.DiffEqSys DiffSys, Int32 dim, Algo algo,
Double epsabs, Double epsrel, Int32 maxfc) [0x00000]
at PhySim.Controller..ctor (PhySim.PhySys sys, Algo algorithm,
Gtk.Window winMain) [0x00000]
at MainClass.SysBox (PhySim.PhySys phySys) [0x00000]
at MainClass.Main (System.String[] args) [0x00000]
---------------------------------------------------------------------
Can somebody tell me what to do? How to find out what this unknown
method at 0x00000 is?
--
Frank Hrebabetzky +55 / 48 / 3235 1106
Florianopolis, Brazil
More information about the Mono-list
mailing list