C# mapscript...

Tamas Szekeres szekeres.tamas at FREEMAIL.HU
Tue Feb 28 15:54:21 EST 2006


John,

As far as I know precompiled binaries targeting the .NET framework 2.0 is
not avaiable to download. However I suggest to compile one from the source.
It is highly recommended to compile mapserver and mapscript with the same
compiler version VS2005 in this case. You should enable only the options
will be actually used in order to minimize the dependency from high number
of libraries.

Both of the current stable release (4.8.1) and the CVS version is known
compilable
with VS2005 with the following notes:

1. Pre download and compile all of subsequent libraries to be used along
with mapserver according to
http://mapserver.gis.umn.edu/docs/howto/win32_compiling
2. edit nmake.opt to enable the libraries
3. Heck regex according to
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1651
4. To compile mapserver use Visual Studio 2005 Command Prompt issue
nmake -f makefile.vc in the mapserver directory.
5. To compile mapscript C# download swigwin-1.3.28 edit makefile.vc in the
mapscript/csharp directory and give your swigwin path
6. To eliminate high number of warnings you should define
_CRT_SECURE_NO_DEPRECATE and _CRT_NONSTDC_NO_DEPRECATE like this:

OPTFLAGS = /nologo /MD /Zi /D_CRT_SECURE_NO_DEPRECATE
/D_CRT_NONSTDC_NO_DEPRECATE $(WARNING_LEVEL) $(DEBUG)

7. If you are not using the CVS version modify owsrequest.i according to
http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=1677

8. Use nmake -f makefile.vc in the mapscript/csharp directory

To test your compilation:

1. Create a new VS project
2. Add reference to mapscript_csharp.dll
3. Add reference to Microsoft Visual
Studio8\VC\redist\x86\Microsoft.VC80.CRT\Microsoft.VC80.CRT.manifest
4. Use mapscript objects within your code
5. Compile your solution
6. Copy the compiled mapscript.dll, libmap.dll and the dependent dll-s into
your app directory.
7. Run

If your are not using the IDE (eg. to try the samples like drawmap.exe) you
should create a proper manifest file along with your .exe declaring a
reference to the CRT assemblies, otherwise the program will not run.

I hope not to forget anything.


If it is required precompiled binaries could be created for download, but
one should define the possible reasonable variations of the required library
usage.

Best Regards,

Tamas Szekeres



On Tue, 28 Feb 2006 08:44:39 -0600, John Cole <john.cole at UAI.COM> wrote:

>Hello,
>  Is someone maintaining a binary of C# mapscript (.net 2.0)?
>
>Thanks,
>
>John Cole



More information about the mapserver-users mailing list