I have a simple c# app trying to PInvoke to a shared library on my Mandrake 10 box using Mono-0.31.
 
I assumed that mono would look in the current directory but it seems my assumption is wrong since the so in question does exist.
 
I'm even hardcoding the path in my DllImport attribute:
 
  [
  DllImport
  (
  "/home/martin/source/foo",
  EntryPoint="MyFunc",
  CharSet=CharSet.Ansi,
  CallingConvention=CallingConvention.Cdecl
  )
  ]
  private static extern IntPtr MyFunc(int v, [MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.LPStr)] string[] a, string n);
Please bear in mind that I'm not a very experienced linux user so in all likelihood I've done something profoundly stupid or overlooked something really obvious.
 
Where does mono look for so's?
 
Thanks,
 
Martin

Reply via email to