[Mono-osx] Issue with DLL - How to make use of DLL

Geoff Norton gnorton at novell.com
Sat Oct 18 20:37:14 EDT 2008


If you store it relative to the exe mono will find it automatically.

-g

On Sun, 2008-10-19 at 08:21 +0800, Viet Le wrote:
> Hi Geoff,
> 
> Thank you for the reply. May I know where to store the newly
> compiled .dylib file to pinvoke?
> 
> Best regards,
> Viet.
> 
> On Sun, Oct 19, 2008 at 5:40 AM, Geoff Norton <gnorton at novell.com>
> wrote:
>         You can't, you've compiled a native library.  You need to port
>         it to Mac
>         and compile the code there to pinvoke it.
>         
>         -g
>         
>         
>         On Sat, 2008-10-18 at 23:34 +0800, Viet Le wrote:
>         > Hi all,
>         >
>         > I compiled C# code on MacOS Tiger using Mono 2.0 and
>         compiled the
>         > tidyit.dll using Visual Studio 2005 SP1 on Windows XP SP3.
>         >
>         > The part of code that references tidyit.dll is:
>         >
>         > namespace Viet.Projects.Google
>         > {
>         >         class GoogleClient
>         >         {
>         >                 [DllImport("tidyit.dll")]
>         >                 public static extern string tidyit(string
>         input, ref
>         > string out_str, ref string err_str);
>         >
>         > I don't know how to force/let compiled .exe file to use
>         tidyit.dll on
>         > my Mac:
>         >
>         > Unhandled Exception: System.DllNotFoundException: tidyit.dll
>         >   at (wrapper managed-to-native)
>         > Viet.Projects.Google.GoogleClient:tidyit
>         (string,string&,string&)
>         >   at Viet.Projects.Google.GoogleClient.Main (System.String[]
>         args)
>         > [0x00000]
>         >
>         > Please kindly advise. Thank you very much!
>         >
>         > Best regards,
>         > Viet.
>         >
>         > --
>         > I submit to you that if a man hasn't discovered something he
>         will die
>         > for, he isn't fit to live.
>         > (Martin Luther King Jr.)
>         > -----
>         >
>         
>         > _______________________________________________
>         > Mono-osx mailing list
>         > Mono-osx at lists.ximian.com
>         > http://lists.ximian.com/mailman/listinfo/mono-osx
>         
> 
> 
> 
> -- 
> I submit to you that if a man hasn't discovered something he will die
> for, he isn't fit to live.
> (Martin Luther King Jr.)
> -----
> 



More information about the Mono-osx mailing list