[prev in list] [next in list] [prev in thread] [next in thread]
List: mono-osx
Subject: Re: [Mono-osx] Issue with DLL - How to make use of DLL
From: "Viet Le" <viet.aikidorb () gmail ! com>
Date: 2008-10-19 0:42:37
Message-ID: c13c1ffe0810181742y381cbda6o487b3d76fcdeecb () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Thank you very much for quick reply.
Best regards,
Viet.
On Sun, Oct 19, 2008 at 8:37 AM, Geoff Norton <gnorton@novell.com> wrote:
> 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@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@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.)
> > -----
> >
>
>
--
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.)
-----
[Attachment #5 (text/html)]
<div dir="ltr">Thank you very much for quick reply.<br><br>Best \
regards,<br>Viet.<br><br><div class="gmail_quote">On Sun, Oct 19, 2008 at 8:37 AM, \
Geoff Norton <span dir="ltr"><<a \
href="mailto:gnorton@novell.com">gnorton@novell.com</a>></span> wrote:<br> \
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If you store it relative to the exe \
mono will find it automatically.<br> <font color="#888888"><br>
-g<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Sun, 2008-10-19 at 08:21 +0800, Viet Le wrote:<br>
> Hi Geoff,<br>
><br>
> Thank you for the reply. May I know where to store the newly<br>
> compiled .dylib file to pinvoke?<br>
><br>
> Best regards,<br>
> Viet.<br>
><br>
> On Sun, Oct 19, 2008 at 5:40 AM, Geoff Norton <<a \
href="mailto:gnorton@novell.com">gnorton@novell.com</a>><br> > wrote:<br>
> You can't, you've compiled a native library. \
You need to port<br> > it to Mac<br>
> and compile the code there to pinvoke it.<br>
><br>
> -g<br>
><br>
><br>
> On Sat, 2008-10-18 at 23:34 +0800, Viet Le \
wrote:<br> > > Hi all,<br>
> ><br>
> > I compiled C# code on MacOS Tiger using Mono \
2.0 and<br> > compiled the<br>
> > tidyit.dll using Visual Studio 2005 SP1 on \
Windows XP SP3.<br> > ><br>
> > The part of code that references tidyit.dll \
is:<br> > ><br>
> > namespace Viet.Projects.Google<br>
> > {<br>
> > class \
GoogleClient<br> > > \
{<br> > > \
[DllImport("tidyit.dll")]<br> > \
> public static \
extern string tidyit(string<br> > input, ref<br>
> > string out_str, ref string err_str);<br>
> ><br>
> > I don't know how to force/let compiled .exe \
file to use<br> > tidyit.dll on<br>
> > my Mac:<br>
> ><br>
> > Unhandled Exception: \
System.DllNotFoundException: tidyit.dll<br> > > \
at (wrapper managed-to-native)<br> > > \
Viet.Projects.Google.GoogleClient:tidyit<br> > \
(string,string&,string&)<br> > > at \
Viet.Projects.Google.GoogleClient.Main (System.String[]<br> > \
args)<br> > > [0x00000]<br>
> ><br>
> > Please kindly advise. Thank you very much!<br>
> ><br>
> > Best regards,<br>
> > Viet.<br>
> ><br>
> > --<br>
> > I submit to you that if a man hasn't \
discovered something he<br> > will die<br>
> > for, he isn't fit to live.<br>
> > (Martin Luther King Jr.)<br>
> > -----<br>
> ><br>
><br>
> > \
_______________________________________________<br> > \
> Mono-osx mailing list<br> > > <a \
href="mailto:Mono-osx@lists.ximian.com">Mono-osx@lists.ximian.com</a><br> > \
> <a href="http://lists.ximian.com/mailman/listinfo/mono-osx" \
target="_blank">http://lists.ximian.com/mailman/listinfo/mono-osx</a><br> ><br>
><br>
><br>
><br>
> --<br>
> I submit to you that if a man hasn't discovered something he will die<br>
> for, he isn't fit to live.<br>
> (Martin Luther King Jr.)<br>
> -----<br>
><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>I submit to you that if \
a man hasn't discovered something he will die for, he isn't fit to \
live.<br>(Martin Luther King Jr.)<br>-----<br> </div>
_______________________________________________
Mono-osx mailing list
Mono-osx@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-osx
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic