On Jan 5, 2015, at 6:08 PM, Greg Young <gregoryyou...@gmail.com> wrote:
> Have anyone used mono.posix or mono.unix.native in a cross compiling scenario 
> where you have to support visual studio builds? How did you handle this? I 
> don't seem to be able to do a platform specific reference.

What's the problem? Mono.Posix.dll is MIT/X11; simply bundle the assembly with 
your code, along with MonoPosixHelper.dll (just copy from the Mono install).

Furthermore, Mono.Unix.Native.Stdlib should work as-is on Windows (it uses 
MSVCRT.dll).

You will need to be careful not to actually use Syscall/etc. on Windows, but 
due to the lazy nature of the JIT this should be reasonably straightforward:

        if (running on Unix)
                MethodWhichUsesSyscall ();
        ...

MethodWhichUsesSyscall() won't be JIT'd unless executed, so any references to 
e.g. Syscall will be lazily evaluated, allowing things to work on Windows.

 - Jon

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to