[gdal-dev] C# bindings compile error VSE 2010

Tomas R monshi at home.se
Thu Jul 1 06:02:20 EDT 2010


  Back again trying to compile gdal and the C# interface. This time with 
VSE 2010, Gdal 1.7.2 and Swig 2.0.0 on a Vista32 machine

Gdal compiles fine, no problems, but the C# bindings fail with the 
following error when using nmake:

         csc /platform:x86  /target:library /out:gdal_csharp.dll 
/r:ogr_csharp.dl
l gdal\*.cs AssemblyInfo.cs
Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
Copyright (C) Microsoft Corporation. All rights reserved.

gdal\Band.cs(17,79): error CS0117: 'OSGeo.GDAL.GdalPINVOKE' does not 
contain a
         definition for 'BandUpcast'
gdal\Dataset.cs(17,82): error CS0117: 'OSGeo.GDAL.GdalPINVOKE' does not 
contain
         a definition for 'DatasetUpcast'
gdal\Driver.cs(17,81): error CS0117: 'OSGeo.GDAL.GdalPINVOKE' does not 
contain a
         definition for 'DriverUpcast'
NMAKE : fatal error U1077: 
'C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.EX
E' : return code '0x1'
Stop.

Since I am, and always will be, a newbie on C++ compilation I have no 
idea what to do to fix it or if I can fix it.

And since I am asking here I throw in another Q - I want to target the 
C# bindings to the .Net2 platform. How/where can I control this via the 
commandline compiler, via the nmake command?

Yours
Tomas





More information about the gdal-dev mailing list