<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#000000 size=2>Fellow MapServer Implementers,</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp; Steven Lime asked me to write a summary on 
implementing</FONT></DIV>
<DIV><FONT size=2>Mapserv on Windows NT.&nbsp; Below is a short note on my 
experiences.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>I've taken a few short cuts just to get it up and running 
(especially</FONT></DIV>
<DIV><FONT size=2>with the regex stuff), so if anyone else has suggestions, 
improvements</FONT></DIV>
<DIV><FONT size=2>etc, I'm all ears!&nbsp; And since I haven't tested all the 
functionality yet,</FONT></DIV>
<DIV><FONT size=2>some of the those short cuts may cause problems.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Brent Fraser</FONT></DIV>
<DIV><FONT size=2></FONT>
<DIV><FONT color=#000000 size=2>GeoAnalytic Inc.<BR>1150 , 633 - 6th Avenue SW 
Calgary, AB T2P 2Y5<BR>Tel:&nbsp; (403)213-2700 Fax:&nbsp; (403)213-2707<BR><A 
href="mailto:info@geoanalytic.com">info@geoanalytic.com</A> <BR><A 
href="http://www.geoanalytic.com">www.geoanalytic.com</A><BR></FONT></DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000000 
size=2>===================================================</FONT></DIV>
<DIV><FONT color=#000000 size=2>Implementing University of Minnesota 
MapServer</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>1.&nbsp; Software Configuration</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; The software I use for 
actually running the Mapserver</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT><FONT size=2>(once it is compiled) 
are:</FONT></DIV>
<DIV><FONT size=2>&nbsp; </FONT></DIV>
<DIV><FONT size=2></FONT><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; Windows 
NT Workstation 4.0</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; Apache 1.3 
Webserver</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; MapServer 3.211</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; <FONT color=#000000>I use 
Visual C++ 5.0 for building Mapserver, and the following</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT color=#000000></FONT></FONT><FONT 
size=2>components:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; <FONT 
color=#000000>freetype-1.2 from <A 
href="http://www.freetype.org/download.htm">http://www.freetype.org/download.htm</A></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT color=#000000></FONT>&nbsp;&nbsp;&nbsp; 
tiff-v3_4beta035-tar.gz from <A 
href="ftp://ftp.sgi.com/graphics/tiff">ftp://ftp.sgi.com/graphics/tiff</A></FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (I 
see that beta37 is now available)</FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT color=#000000></FONT>&nbsp;&nbsp;&nbsp; 
hs_<FONT color=#000000>regex from <A 
href="http://people.delphi.com/gjc/winregex.html">http://people.delphi.com/gjc/winregex.html</A></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT color=#000000>&nbsp;&nbsp;&nbsp; proj4 
4.3.3 from <A 
href="ftp://kai.er.usgs.gov/pub/proj.4">ftp://kai.er.usgs.gov/pub/proj.4</A></FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT color=#000000></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2><FONT color=#000000></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2><FONT color=#000000></FONT></FONT><FONT 
color=#000000 size=2>&nbsp;&nbsp;&nbsp; Other components used are from the 
Mapserver distribution</FONT></DIV>
<DIV><FONT color=#000000 size=2>(gd, shapelib) although they are available on 
the Internet as well.</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; I compile each of the 
components into libraries using a separate</FONT></DIV>
<DIV><FONT color=#000000 size=2>VC++ project for each.&nbsp; I also </FONT><FONT 
size=2>make a library out of most of the</FONT></DIV>
<DIV><FONT size=2>mapserver files, all except </FONT><FONT size=2>mapserv.c. 
Mapserv.c is in it's own</FONT></DIV>
<DIV><FONT size=2>project </FONT><FONT color=#000000 size=2>with the compiled 
libraries from the other projects.</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>2.&nbsp; Changes to Source Code</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>Changes to Mapserver source</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>MAPFILE.C, function msLoadMap, (around line 1120), comment 
out</FONT></DIV>
<DIV><FONT size=2></FONT><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; the 
&quot;if&quot; block that starts with:</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if(regexec(&amp;re, filename, 0, NULL, 0) != 0) { /* no match */</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; It has problems with Windows 
style paths</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>MAPSHAPE.C, at the top of the file 
insert</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#include &lt;memory.h&gt;</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; <FONT color=#000000>for 
Windows compatibility</FONT></FONT></DIV>
<DIV><FONT color=#000000 size=2><FONT color=#000000></FONT></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>MAPSERV.C,&nbsp; function ReturnHTML, (around 
line 740?), comment out</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; the &quot;if&quot; block that 
starts with</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if(regexec(&amp;re, html, 0, NULL, 0) != 0) { /* no match */</FONT></DIV>
<DIV><FONT size=2></FONT><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; again, 
problems with Windows paths</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Changes to Proj4 source</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>In PARAM.C and PROJECTS.H, change all occurrences of 
PVALUE</FONT></DIV>
<DIV><FONT size=2>(there is four of them)&nbsp; to something like PJVALUE, since 
Windows</FONT></DIV>
<DIV><FONT size=2>already uses PVALUE</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Changes to regex source</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>In REGEXEC.C and REGEX.H, remove any occurrences 
of __stdcall.</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT><FONT size=2>Windows now has a different 
default calling convention.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>Changes to libtiff source</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>In TIF_WIN32.C, in function _tiffUnmapProc, comment out the 
following</FONT></DIV>
<DIV><FONT size=2>line:</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp; CloseHandle((HANDLE)map_handle);</FONT></DIV>
<DIV><FONT size=2></FONT><FONT color=#000000 size=2>For some reason, this causes 
mapserv to crash on NT.</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>=====================</FONT></DIV>
<DIV><FONT size=2>That's all there is to making mapserv.exe for Windows 
NT.</FONT></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>