[Mono-list] Re: [DotGNU]Swig and C# (was: Strategy for dealing with C++ )
James Michael DuPont
Tue, 10 Dec 2002 04:03:59 -0800 (PST)
I downloaded the example,
I have done a quick test of the generation, using the cvs version of
Very impressive for a first start. It looks just like code from XSharp,
Here is a method i have been fighting with with the php4 swig :
int librdf_serializer_serialize_model(librdf_serializer* serializer,
FILE *handle, librdf_uri* base_uri, librdf_model* model);
The generated code is this :
public static extern int librdf_serializer_serialize_model(int jarg1,
int jarg2, int jarg3, int jarg4);
I dont have time at work to look into this,
but it looks like all the type information got killled.
I will try it out with pnet at home and report any success, or what I
had to change to get this running.
If all works out, we can use swig for creating lots of C# wrappers.
Thanks for the tips, I will be looking into this in detail.
--- Neil Cawse <email@example.com> wrote:
> I think using swig makes sense:
> the original code is tested and works
> it will be improved and maintained by people working on swig.
> now I don't want to put more work into this if the approach is wrong.
> anyone got a better idea?? Should we be waiting for Binge from qt#
> project -
> or Gopal your stuff?
> let me know!
> Do any of you bright people want to finish this\improve this? I might
> some time in the holidays.
> some things:
> Just started!
> It's the Java SWIG - just changed for c# - you'll still see all java
> Using VC 7 solution to build - you might have to recreate because im
> Visual Studio Everett final beta.
> Modifications off the stock are basically in 3 places:
> in Examples\Clr. Two examples I created. Im using class to do my
> in Source\Modules1.1\clr.cxx (copied from java.cxx)
> in Lib\Clr.swg - mappings
> ----- Original Message -----
> From: "Gopal V" <firstname.lastname@example.org>
> To: "Neil Cawse" <email@example.com>
> Cc: <firstname.lastname@example.org>
> Sent: Sunday, December 08, 2002 11:30 AM
> Subject: [DotGNU]Swig and C# (was: Strategy for dealing with C++ )
> > If memory serves me right, Neil Cawse wrote:
> > > ** now adding C#
> > Could you point me to your source code ? ... (I've written 80% of
> > generator in python anyway) .... I think it will be interesting to
> > how your code handles function pointers , structs and tracing back
> > to their original types...
> > I have used Swig for python and found it grossly insufficent for my
> > work ... (easy, but not sufficent) ... I finally wrote my own
> > in C for Python ... which is a lot more flexible than SWIG ... I
> > that might be true for C# as well ... But to be sure, I need a peek
> > Swig - C#.
> > My PInvoke wrapper is built from the idea originated from Rhys with
> > Which is accessible from the dotgnu-libs CVS .. That concept of
> > code without C call-ins , is as portable as PInvoke ever gets ...
> > is guy to follow for portability....)
> > Gopal
> > --
James Michael DuPont
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.