[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [DotGNU]Calling between C and C# IL code: how?
From: |
Schneider, Michael |
Subject: |
RE: [DotGNU]Calling between C and C# IL code: how? |
Date: |
Mon, 21 Apr 2003 13:08:24 -0400 |
Swig works with .net now,
Take a look at www.swig.org
-----Original Message-----
From: Rhys Weatherley [mailto:address@hidden
Sent: Tuesday, April 15, 2003 6:43 PM
To: David Jung; address@hidden
Subject: Re: [DotGNU]Calling between C and C# IL code: how?
On Monday 14 April 2003 06:23 am, David Jung wrote:
> I would like to call C functions from C# and C# from C.
> I think I can figure out C->C# using __invoke__, but can't figure
> out how to do C#->C.
That's because I haven't figured out how to do it yet. :-) Suggestions for an
appropriate syntax are welcome. I think MS has some kind of C# attribute
that says "this is in the global scope", but I'm not 100% sure how it works
in the compiler or linker.
Another way to do C->C# is with the "__module" keyword in C#. See
"pnetC/libc/unistd/unistd-glue.cs" for an example. This allows you to define
a method in C# that looks like a regular function to C. Avoids the need for
the ugly __invoke__ syntax.
> PS: Is anone working on a managed C++ compiler for .GNU? (either
> compatible or incompatible with MS's version - don't care)
No plans as yet. C++ is very, very, very hard. If we could find a decent
open/free cfront tool, we could feed the output of that into the C compiler
as a stopgap solution. Porting gcc has always been in the "too hard" basket.
Cheers,
Rhys.
_______________________________________________
Developers mailing list
address@hidden
http://dotgnu.org/mailman/listinfo/developers