Code: Show/Hide mcs -t:library test.cs |
Code: Show/Hide pkg-config --cflags mono |
Code: Show/Hide pkg-config --libs mono |
Code: Show/Hide mono_add_internal_call("NS.MonoEmbed::Log", lm->Log);
|
Code: Show/Hide [MethodImplAttribute(MethodImplOptions.InternalCall)]
static extern void Log(char filter, IntPtr msg); public int Length(string s) { string msg = "string has length of "+ s.Length; MonoEmbed.Log('E', Marshal.StringToHGlobalAnsi(msg)); return s.Length; } |