How to compile mapserv for NT.

Brent Fraser bfraser at geoanalytic.com
Mon Mar 27 11:49:51 EST 2000


Brian,

  Attached is a somewhat dated (and terse) list of instructions
for compiling on NT.  Hopefully it will get you started.

Brent Fraser

bfraser at geoanalytic.com
GeoAnalytic Inc.
#300 , 700 - 4th Avenue SW Calgary, AB T2P 3J4
Tel:  (403)213-2700 Fax:  (403)213-2707
www.geoanalytic.com


----- Original Message -----
From: <bfischer at usgs.gov>
To: <mapserver-users at lists.gis.umn.edu>
Sent: Monday, March 27, 2000 9:01 AM
Subject: How to compile mapserv for NT.


> Hello everyone,
>
> I was wondering if anyone has some detailed instructions on how to compile
> mapserver for the NT with FreeType and LibTiff.  We  have Microsoft's
> Visual C++ compiler.  I figured it was about time I learned how to compile
> mapserver.  This is kind of new for me, so any help would be appreciated.
>
> Thanks,
>
> Brian Fischer
> bfischer at usgs.gov
> USGS WRD
> 2280 Woodale Dr.
> Mounds View, MN
> (612) 783-3133
>
>
-------------- next part --------------
  Below is an email that I sent to the mapserver group
some time ago.  Since I sent the email, Steve had modified
all his Mapserver code to compile on NT without any changes,
so the  notes on changes to Mapserver source no longer apply.  

Changes to the source code of the other dependant packages
(proj4, regex, etc) still apply.
 
  If you still have problems building on NT, let me know,
and I'll send you the project files.
 
 
==========================================
Implementing University of Minnesota MapServer
 
1.  Software Configuration
 
    The software I use for actually running the Mapserver
(once it is compiled) are:
  
    Windows NT Workstation 4.0
    Apache 1.3 Webserver (or MS IIS 4.0)
    MapServer 3.2 / 3.3
 
    I use Visual C++ 5.0 for building Mapserver, and the
following components:
 
    freetype-1.2 from http://www.freetype.org/download.htm

    tiff-v3_4beta035-tar.gz from ftp://ftp.sgi.com/graphics/tiff
        (I see that v3_4beta37 is now available)

    hs_regex from http://people.delphi.com/gjc/winregex.html

    proj4 4.3.3 from http://kai.er.usgs.gov/ftp/PROJ.4/proj.html
 
 
    Other components used are from the Mapserver distribution
(gd, shapelib) although they are available on the Internet as well.
 
    I compile each of the components into libraries using a
separate VC++ project for each.  I also make a library out of
most of the mapserver files, all except mapserv.c. Mapserv.c is
in it's own project.  The libraries are referenced in the 
Project -> Settings, Link tab, Object/Library Modules.

	Make sure you set the folllowing preprocessor settings
in each of the VC++ projects:

        Project
	Name:		Preprocessor Settings:

	gd		USE_TIFF,USE_TTF,USE_PROJ
	gdft		USE_GD_1_2,USE_TIFF,USE_TTF,USE_PROJ
	maplib		USE_GD_1_2,USE_TIFF,USE_TTF,USE_PROJ,NEED_STRNCASECMP,NEED_STRCASECMP
	freetype	-
	PROJ4		-
	regex_hs	-
	libtiff		-
	shapelib	USE_TIFF,USE_TTF,USE_PROJ (I'm not sure if these are necessary)
	mapserv		USE_TIFF,USE_TTF,USE_PROJ
 
 
2.  Changes to Source Code
 
Changes to Mapserver source
 
	Currently they are:

  ms_3.3\mapparser.c:
	//#if defined (MSDOS) && !defined (__TURBOC__)    /* BWF *
	#if (defined (MSDOS) && !defined (__TURBOC__)) || defined (WIN32)    /* BWF */
  ms_3.3\mapproject.c:
	//  UV p;   /* BWF */
	  ptUV p;   /* BWF */


 
 
Changes to Proj4 source
 
In PARAM.C and PROJECTS.H, change all occurrences of PVALUE
(there is four of them)  to something like PJVALUE, since Windows
already uses PVALUE.  Also change UV to ptUV.  These changes are not necesary)
if you do not include any Window-specific include files (windows.h, etc).


 
Changes to regex source
 
In REGEXEC.C and REGEX.H, remove any occurrences of __stdcall.
Windows now has a different default calling convention.
 
 
Changes to libtiff source
 
In TIF_WIN32.C, in function _tiffUnmapProc, comment out the following
line:
   CloseHandle((HANDLE)map_handle);
For some reason, this causes mapserv to crash on NT.
[Note: this might not be necessary anymore in the newer versions of 
MapServer]


=====================
That's all there is to making mapserv.exe for Windows NT.


More information about the mapserver-users mailing list