[Gdal-dev] C# Bindings

Simon Perkins sy at perkins.net
Fri Dec 30 19:59:11 EST 2005


I'm using visual c#/c++ 2005 express editions and having some trouble 
cuilding the c# bindings for GDAL.

After having built the GDAL library, I cd to the swig directory and type:

 > nmake /f makefile.vc csharp

The build fails with the message:

        cd ..
        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.


Anybody know what's happening here?

Cheers,

Simon





More information about the Gdal-dev mailing list