I want compile GDAL library to use in C# program. I use Microsoft Visual Studio 2013. Before, I compiled GDAL C++, as result I have dlls and libraries (No problems) . Next I try compile with instruction, because I want use GDAL in C# program. But, I don't understate what should I do in this step.
Creating the SWIG interface code For creating the interface execute the following command.
nmake /f makefile.vc interface
Previous Step make's error when regenerates the *PINVOKE.cs files ,so skip to next step ,it will work
I try skip this step, but always have the same exception (show below). As result I don't have dlls to use in C#...
ogr\OsrPINVOKE.cs(192,10): error CS0111: Type 'OSGeo.OGR.OsrPINVOKE' already
defines a member called 'OsrPINVOKE' with the same parameter types
ogr\OsrPINVOKE.cs(188,10): (Location of symbol related to previous error)
NMAKE : fatal error U1077: '"C:\Program Files (x86)\MSBuild\12.0\bin\csc.EXE"' :
return code '0x1'
Stop.
What should I compile GDAL to C#? Maybe you have any idea.
You can find compiled binaries at http://www.gisinternals.com/
Just add reference to \bin\gdal\csharp*_csharp.dll, add *_wrap.dll to your output location and other gdal dlls.