[Mono-dev] Integrating C# and already existing C sources using GAPI or something similar

William S Fulton wsf at fultondesigns.co.uk
Tue Jan 24 18:05:46 EST 2006


Mike Kestner wrote:
> On Mon, 2006-01-23 at 12:39 +0100, Mario Sánchez wrote:
>>  2.-I have more source code that I'd like to re-use but that is not
>>installed as a library, because it's not a library but an application
>>(the application in which I'm trying to re-implement a use case in Mono
>>terms), but it has got, for example, several defined Gobjects and
>>utilities that are useful for me to use from my Gtk# interface. The
>>question is how could I automatically wrap those sources using Gapi (or
>>something similar) into C# files, in order not to have to implement that
>>already-written functionality again.
> 
> GAPI is not a C to C# translator.  It won't transform C code into C#.
> It uses the DllImport/PInvoke capability of .Net/mono to invoke native
> library methods.  So short answer is, no library, no GAPI.
> 

SWIG might help as it can semi-automatically wrap C sources for use from
managed code. See http://www.swig.org.

William




More information about the Mono-devel-list mailing list