[Mono-list] Pure wrapper calling native code
Dan.Maser at inin.com
Thu Aug 5 13:49:21 EDT 2010
It's possible if you own the source to the unmanaged DLL can make ports to the desired operating systems. My project makes heave use of both managed C# and unmanaged C++ dlls, and the C++ dlls I compile for both windows and linux.
From: mono-list-bounces at lists.ximian.com [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Stifu
Sent: Thursday, August 05, 2010 12:40 PM
To: mono-list at lists.ximian.com
Subject: Re: [Mono-list] Pure wrapper calling native code
Aren't native / unmanaged DLLs Windows only? If that's the case, then it's
Brendon Chung wrote:
> I currently have a program written in C# and running via Mono on my Mac.
> I need this program to access an unmanaged C++ dll.
> My first attempt at this was using the DllImport call, but the call always
> fails out for me. I'm now trying to write a managed C++ wrapper dll to
> bridge between my C# program and the unmanaged C++ dll.
> My question is: is this even possible? In order to be Mac-compatible, I
> need to compile my C++ wrapper with /clr:pure and /nodefaultlib. But after
> some research, it seems that /clr:pure precludes the possibility of
> importing/using any unmanaged code.
> So, is a wrapper feasible, or is DllImport the only way to go?
> Brendon Chung
View this message in context: http://mono.1490590.n4.nabble.com/Pure-wrapper-calling-native-code-tp2315133p2315364.html
Sent from the Mono - General mailing list archive at Nabble.com.
Mono-list maillist - Mono-list at lists.ximian.com
More information about the Mono-list