|
From: William S F. <ws...@fu...> - 2014-12-06 19:07:45
|
It would be great if you submitted this as a SWIG github patch along with a testcase for inclusion in newer versions of SWIG. William On 30 October 2014 at 08:03, Mathieu Malaterre <mat...@gm...> wrote: > Thanks much William ! I had copy/paste std_map.i to implement support > for std::set in C#: > > > http://sourceforge.net/p/gdcm/gdcm/ci/a55d1870a633a4eade24e45533ab499b26a5c5ad/tree/Wrapping/Csharp/std_set.i > > I'll do the diff with the current swig3.0/csharp/std_map.i and should be > done. > > Thanks again, > > On Thu, Oct 30, 2014 at 8:21 AM, William S Fulton > <ws...@fu...> wrote: > > Just to be a bit more clear, you should aim to modify your .i file to > fully > > qualify your use of IDisposable to 'global::System.IDisposable'. I don't > > know where this is coming from, but it is likely to be from a > 'csinterfaces' > > or 'csinterfaces_derived' typemap in your .i file. If you fully qualify > > IDisposable, it will still work when using SWIG 2. > > > > William > > > > On 30 October 2014 07:06, William S Fulton <ws...@fu...> > wrote: > >> > >> See the CHANGES file entry for 3.0.0: > >> > >> 2013-11-09: wsfulton > >> [C#] Apply patch #79 from Brant Kyser > >> - Remove using directives from the generated C# code and > >> fully qualify the use of all .NET > >> framework types in order to minimize potential name > >> collisions from input files defining > >> types, namespace, etc with the same name as .NET > framework > >> members. > >> - Globally qualify the use of .NET framework types in the > >> System namespace > >> - Remove .NET 1.1 support, .NET 2 is the minimum for the > C# > >> module > >> > >> This is a potential backwards compatibility break if code > has > >> been added relying on these using > >> statements that used to be generated: > >> > >> using System; > >> using System.Runtime.InteropServices; > >> > >> The quick fix to add these back in is to add the > >> -DSWIG2_CSHARP command line option when > >> executing SWIG. See CSharp.html documentation for more info. > >> > >> *** POTENTIAL INCOMPATIBILITY *** > >> > >> William > >> > >> On 29 October 2014 08:14, Mathieu Malaterre <ma...@de...> wrote: > >>> > >>> Dear all, > >>> > >>> I am the maintainer of the GDCM package. It currently uses SWIG to > >>> generate its C# API. Some users recently reported that GDCM now fails > >>> to build using recent SWIG 3.x release (SWIG 2.x were fine). The error > >>> is: > >>> > >>> TagSetType.cs(11,27): error CS0246: The type or namespace name > >>> `IDisposable' could not be found. Are you missing `System' using > >>> directive? > >>> > >>> > >>> Where: > >>> > >>> [...] > >>> $ head -12 ./Wrapping/Csharp/TagSetType.cs > >>> /* > >>> > ---------------------------------------------------------------------------- > >>> * This file was automatically generated by SWIG (http://www.swig.org > ). > >>> * Version 3.0.2 > >>> * > >>> * Do not make changes to this file unless you know what you are > >>> doing--modify > >>> * the SWIG interface file instead. > >>> * > >>> > ----------------------------------------------------------------------------- > >>> */ > >>> > >>> namespace gdcm { > >>> > >>> public class TagSetType : IDisposable > >>> #if SWIG_DOTNET_3 > >>> [...] > >>> > >>> My question is: > >>> > >>> - Should I add the missing `using System` using swig macros ? > >>> - Is there a documentation for migrating from swig 2.x to swig 3.x ? > >>> > >>> Thanks much, > >>> > >>> ref: https://github.com/malaterre/GDCM/issues/10 > >>> > >>> > >>> > ------------------------------------------------------------------------------ > >>> _______________________________________________ > >>> Swig-user mailing list > >>> Swi...@li... > >>> https://lists.sourceforge.net/lists/listinfo/swig-user > >> > >> > > > > > > -- > Mathieu > |