[Gdal-dev] GDAL 1.3.2 SWIG C# Bindings?

Marc Lepage mlepage at pyxisinnovation.com
Wed Oct 25 14:24:28 EDT 2006


Hi all.

 

I've tried to build the gdal-1.3.2 SWIG bindings for csharp, which
generate, but fail on C# compilation as noted below.

 

Basically, I think SpatialReference is put in the OSR namespace, but not
scoped (and therefore inaccessible) from the OGR namespace. I don't see
anything in the SWIG interface files or makefiles that would make this
work, but admittedly I'm a SWIG newbie. (Actually, I was rather hoping
to do something similar with namespaces in another project I am wrapping
with SWIG, and therefore curious as to how GDAL accomplished this.)

 

Should this work? Or am I doing something wrong? Thanks.

 

 

csc /debug:full /target:library /out:gdal_ogr_csharp.dll ogr\*.cs

Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42

for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727

Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

ogr\DataSource.cs(78,41): error CS0246: The type or namespace name

        'SpatialReference' could not be found (are you missing a using
directive

        or an assembly reference?)

ogr\Geometry.cs(219,26): error CS0246: The type or namespace name

        'SpatialReference' could not be found (are you missing a using
directive

        or an assembly reference?)

ogr\Geometry.cs(224,24): error CS0246: The type or namespace name

        'CoordinateTransformation' could not be found (are you missing a
using

        directive or an assembly reference?)

ogr\Geometry.cs(229,10): error CS0246: The type or namespace name

        'SpatialReference' could not be found (are you missing a using
directive

        or an assembly reference?)

ogr\Geometry.cs(235,38): error CS0246: The type or namespace name

        'SpatialReference' could not be found (are you missing a using
directive

        or an assembly reference?)

ogr\Layer.cs(147,10): error CS0246: The type or namespace name

        'SpatialReference' could not be found (are you missing a using
directive

        or an assembly reference?)

ogr\ogr.cs(15,57): error CS0246: The type or namespace name
'SpatialReference'

        could not be found (are you missing a using directive or an
assembly

        reference?)

ogr\ogr.cs(21,71): error CS0246: The type or namespace name
'SpatialReference'

        could not be found (are you missing a using directive or an
assembly

        reference?)

NMAKE : fatal error U1077:
'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.EX

E' : return code '0x1'

Stop.

NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio
8\VC\BIN\n

make.EXE"' : return code '0x2'

Stop.

 

-- 

Marc Lepage

the PYXIS innovation - common ground for digital earth

www.pyxisinnovation.com <http://www.pyxisinnovation.com/> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20061025/b3c242b2/attachment.html


More information about the Gdal-dev mailing list