Cross-platform possibilities

Jun 25, 2008 at 7:16 PM
Hi there. I'm interested in making both PC and Mac VSTs. I think you mentioned something about needing a compiler that can work with .NET managed code. Do you think the Mono project would be able to do that? Here's what it says on Wikipedia about this issue:

Within a native .NET/Mono application, all code is managed; that is, it is governed by the CLI's style of memory management and thread safety. Other .NET or Mono applications can use legacy code, which is referred to as unmanaged, by using the System.Runtime.InteropServices libraries to create C# bindings. Many libraries which ship with Mono use this feature of the CLI, such as Gtk#.

Jun 26, 2008 at 6:34 AM
Edited Jun 26, 2008 at 6:35 AM
The problem is that VST.NET uses the managed extensions of the Microsoft C++ compiler. If you would want to compile for the Mac you need to have a 'Mac' C++ compiler that also supports some form of managed extensions.
The System.Runtime.InertopServices do not refer to a compiler but to the P/Invoke services that .NET provide. Typically P/Invoke is used to call unmanged code. But a VST plugin must implement unmanaged code, for it is called over a C/C++ interface that uses function pointers and messages/opcodes. So P/Invoke is quite useless in the VST Plugin scenario (not to mention that its performance is sub-optimal ;-).

So, until you find a 'Mac' compiler that can output mixed assemblies (unmanaged C/C++ and managed code in one assembly) VST.NET is Windows only.