Has anyone have any luck running .NET/Link on Mono?
When I run .NET/Link to call Mathematica from within a Mono program, this is the error message I receive.
Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type initializer for Wolfram.NETLink.Internal.NativeLink ---> System.DllNotFoundException: mathlink
at (wrapper managed-to-native) Wolfram.NETLink.Internal.MacMathLinkAPIProvider:MLBegin (intptr)
at Wolfram.NETLink.Internal.MacMathLinkAPIProvider.extMLBegin (IntPtr zero) [0x00000] in <filename unknown>:0
at Wolfram.NETLink.Internal.NativeLink..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Wolfram.NETLink.MathLinkFactory.createMathLink0 (System.String cmdLine, System.String[] argv) [0x00000] in <filename unknown>:0
at Wolfram.NETLink.MathLinkFactory.CreateMathLink (System.String cmdLine) [0x00000] in <filename unknown>:0
at Wolfram.NETLink.MathLinkFactory.createKernelLink0 (System.String cmdLine, System.String[] argv) [0x00000] in <filename unknown>:0
at Wolfram.NETLink.MathLinkFactory.CreateKernelLink (System.String cmdLine) [0x00000] in <filename unknown>:0
Now the C# code for calling Mathematica is:
_kl = MathLinkFactory.CreateKernelLink("-linkmode launch -linkname '\"/Applications/Mathematica.app/Contents/MacOS/MathKernel\" -mathlink'");
The same argument worked for J/Link, but for some reason does not work on NETLink.