-------------------------------------------------------------------- README.WIN32 - Microsoft Visual C++ Build instructions for MapServer -------------------------------------------------------------------- -------------------------------------------------------------------- IMPORTANT - READ THIS FIRST: The Win32 build process is not very friendly for unexperienced users. So it is strongly recommended that you use one of the precompiled binaries available on the MapServer site: http://mapserver.gis.umn.edu/win32binaries.html There are precompiled Win32 binaries available for the last stable release and the latest nightly build and they include the most common options... so you shouldn't have to compile your own executables. If for some reason you still decide to compile Win32 binaries yourself, then don't do it unless you really know what you're doing... and hopefully the rest of this file contains some hints that may help you. Good Luck! -------------------------------------------------------------------- For the developers using MSVC++, a NMAKE makefile (Makefile.vc) to build the MapServer library and executable programs is included with the distribution. To build the package using the Makefile.vc and NMAKE: - Edit Makefile.vc to select (or deselect) optional components of the MapServer. Please read the notes below about each component before you move ahead with the compilation. - Open a DOS prompt window - Run the VCVARS32.BAT script to initialize the VC++ environment variables. VCVARS32.BAT is automatically generated by the MSVC++ install procedure and should be located in the BIN sub-directory of your MSVC++ installation. - Then start the build with: nmake /f Makefile.vc This will create "mapserv.exe" (the main MapServer CGI program), the other command-line utilities, and "mapserver.lib" that is used by the MapScript modules. -------------------------------------------------------------------- MapScript -------------------------------------------------------------------- To compile the various versions of MapScript (Perl, PHP, etc) first compile the main mapserver directory and then see the README files in the mapscript/perl or mapscript/php3 directory for specific instructions. -------------------------------------------------------------------- GD library -------------------------------------------------------------------- - MapServer uses the GD library from http://boutell.com/ and the Win32 makefiles are set by default to work with GD version 1.2. If you are using a different version of GD, then it is very important to make sure that you update the -DUSE_GD_* flags in all the Makefile.vc. -------------------------------------------------------------------- REGEX library -------------------------------------------------------------------- - MapServer uses the REGEX library which is standard on all the Unix systems that I know of, but does not come with VC++. If the MapServer distribution did not include a copy of the REGEX library, then you can get a copy from: ftp://ftp.gnu.org/pub/gnu/regex/regex-0.12.tar.gz The default case in the Makefile.vc is set to compile with GNU regex-0.12 located in the "regex-0.12" directory. - If you are planning to compile the PHP3_MAPSCRIPT.DLL module, then it is important to make sure that the main Makefile.vc creates MAPSERVER.LIB with the same version of REGEX that PHP uses. See the notes in the main Makefile.vc about that. -------------------------------------------------------------------- Notes on libtiff build. -------------------------------------------------------------------- - LibTiff comes with a makefile.vc in the libtiff directory, so building it should be as simple as: cd tiff-v3.5.4/libtiff nmake /f makefile.vc - see also the libtiff installation procedures (tiff-v3.5.4/html/build.html) - the makefile refers to file fax3sm_winnt.obj. This file is not in the ./libtiff directory. To be able to build sucessfully, copy the file from the ./contrib/winnt directory (file is fax3sm.c) to your libtiff directory and rename it to fax3sm_winnt.c -------------------------------------------------------------------- Notes on Freetype build. -------------------------------------------------------------------- - You can use the Visual Workspace in freetype/lib/arch/win32 to build the library. - make sure the value of the -DUSE_GD_* flag in the gdft/Makefile.vc matches the version of GD that you are building with. - directory ./mapserver/gdft should not be compiled with DEBUG option ---------------- $Id$ ----------------