[Gdal-dev] C# Bindings

Tamas Szekeres szekerest at gmail.com
Thu Nov 2 11:23:19 EST 2006


> As with so many VS 2005 problems, this turned out to be a manifest
> issue. Inserting a few lines into the makefile.vc to embed the manifest
> files into the DLLs fixed this. I'll check in these changes if nobody
> objects. I suspect that similar lines need to be added for other SWIG
> languages on windows if anyone else feels like doing that...

Please give me the option to investigate the problem in more detail. I
would not keen to decorate the c# assemblies with embedded manifests
by default. I consider this as solely a VS2005 issue. I would also
keep up the support for the MONO runtime currently on Windows and on
Linux/OSX in the future.
As far as I remember the VS2005 linker is able to generate the
manifest files along with the binaries. Placing the manifests in the
same directory as the executable with the same name adding the
.manifest extension would be sufficient in most cases.
However for the ASP.NET applications (where the host process is
outside of the application, and the security context is different)
embedding the manifests might be required for the VS2005 builds.
For more details see our experiences for the mapscript libraries here:

> However, I'm still a little unclear about exactly how to use the SWIG
> libraries. My primary interest is in the GDAL RasterIO functions, which
> seem to be present as Band.ReadRaster() and Band.WriteRaster(). The C#
> function signatures for these are:

Well, I have dealt mostly with the OSR/OGR part of the interface so
far and we have some typemaps missing mostly at the GDAL part.
Therefore you cannot really use those functions with objects prefixed
I'm continously adding the missing typemaps to the interface, and I
have to write test samples so see how GDAL handles the parameters and
the return values behind the scenes.
So as to speed up this work if would be helpful if I got some expected
C# examples to see how the folks would use the interface. Some of the
specific test samples could be placed into the \swig\csharp\apps
directory as well.

Best Regards,

Tamas Szekeres

More information about the Gdal-dev mailing list