[Gdal-dev] Compiling C# bindings for 1.3.0b1

Howard Butler hobu at iastate.edu
Mon Aug 15 11:12:04 EDT 2005


Mike,

The C# bindings can only be compiled with Microsoft Visual Studio .NET 2003 
.  I see that you are using MSVC 6 by the VC98 directory in your make 
statement.  Any chance you are using the wrong compiler VCVARS32.BAT?

Also, as I stated before in a previous email, the C# bindings are not 
complete.  You will be able to do some basic things like open a GDAL 
Dataset and write out a copy, but you will not be able to use any functions 
that return complex types (like GetGeoTransform).  If you are really 
committed to C# and GDAL, be prepared to invest some effort in developing 
the typemap conversions to do so.  There are dummy typemaps in the 
typemaps_csharp.i file that specify what will need to be done.

Howard

At 09:55 AM 8/15/2005, Mike Boos wrote:
>Hello
>
>This is my first time trying to compile GDAL. I am using version 1.3.0 
>beta 1 on Windows, as I need to be able to use it with C#. I compiled the 
>main portion without a hitch. When I go into the swig directory and invoke 
>'nmake /f makefile.vc csharp', I get the following errors:
>
>osr_wrap.cpp(2660) : error C2065: 'ANY' : undeclared identifier
>osr_wrap.cpp(2660) : error C2057: expected constant expression
>osr_wrap.cpp(2660) : error C2466: cannot allocate an array of constant size 0
>osr_wrap.cpp(2660) : error C2133: 'argout4' : unknown size
>osr_wrap.cpp(2721) : error C2057: expected constant expression
>osr_wrap.cpp(2721) : error C2466: cannot allocate an array of constant size 0
>osr_wrap.cpp(2721) : error C2133: 'argout4' : unknown size
>NMAKE : fatal error U1077: 'cl' : return code '0x2'
>Stop.
>NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~4\VC98\BIN\NMAKE.EXE' : 
>return code '0x2'
>Stop.
>NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~4\VC98\BIN\NMAKE.EXE' : 
>return code '0x2'
>Stop.
>
>The errors appear to be occuring in a file that is generated by SWIG (I'm 
>using version 1.3.25). Would anyone be able to help me in figuring out 
>what I need to do to get this to compile?
>
>Thanks
>Mike Boos
>_______________________________________________
>Gdal-dev mailing list
>Gdal-dev at lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/gdal-dev




More information about the Gdal-dev mailing list