[mapserver-users] Compile Error
FradshamT at DFO-MPO.GC.CA
FradshamT at DFO-MPO.GC.CA
Thu Sep 13 08:44:23 PDT 2001
I have been watching the list for a while hoping someone had the same
compile error that I have been affected with, but with no luck. My thanks to
Daniel Morissette and David Armstrong for their postings regarding compiling
MapServer on a Win32 platform. I have searched the online archives (which
have been very helpful for other components) but I have not found an exact
problem.
BACKGROUND:
I am compiling MapServer 3.5 with:
GD 2.0.1
FreeType 2.0.4
GDAL 1.1.5
Jpeg-6b
LibPng 1.20
Proj 4.4.3
Regex 0.12
LibTiff 3.5.6
Zlib 1.1.3
I modified my Makefile.vc as David Armstrong And Daniel Morissette had
suggested but I get the following error:
D:\Mapserver>nmake /f makefile.vc
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
cd gd-2.0.1
nmake /f makefile.nt gd.lib OPTFLAGS="/nologo /Zi"
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
NMAKE : fatal error U1073: don't know how to make 'gdttf.obj'
Stop.
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~2\VC98\BIN\NMAKE.EXE' :
return co
de '0x2'
Stop.
A copy of my MakeFiles for Mapserver 3.5 and GD 2.0.1 follows this email for
those who want to have a look. So if anyone can help it would be greatly
appreciated.
Trevor Fradsham
Systems Analyst - GIS
Canadian Coast Guard Portfolio
IM&TS, Fisheries & Oceans
MAKEFILE.VC for MapServer 3.5
#
# makefile.vc - Main MapServer makefile for MSVC++
#
# This VC++ makefile will build MAPSERVER.LIB, MAPSERV.EXE, and the other
# MapServer command-line programs.
#
# To use the makefile:
# - Open a DOS prompt window
# - Run the VCVARS32.BAT script to initialize the VC++ environment
variables
# - Start the build with: nmake /f makefile.vc
#
# $Id: Makefile.vc,v 1.12 2001/08/23 15:22:29 dan Exp $
#
#OPTFLAGS = /nologo /Zi /W3 /DDEBUG
OPTFLAGS = /nologo /Zi
BASE_CFLAGS = $(OPTFLAGS)
LDFLAGS = /NODEFAULTLIB:libcd
CC= cl
LINK= link
#
# If you want to ignore missing datafile errors uncomment the following
# line. This is especially useful with large tiled datasets that may not
# have complete data for each tile.
#
#IGNORE_MISSING_DATA=-DIGNORE_MISSING_DATA
#
# Apparently these aren't as commonplace as I'd hoped. Edit the
# following line to reflect the missing functions on your platform.
#
#STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRDUP
STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP
# Proj.4 distribution (cartographic projection routines). Not required for
normal use. (EXPERIMENTAL)
PROJ_LIB=./proj-4.4.3/src/proj.lib
PROJ_INC=-I./proj-4.4.3/src
PROJ=-DUSE_PROJ
#Use this flag to compile with WMS support
WMS=-DUSE_WMS
# GD distribution (graphics library GIF and/or PNG support). (REQUIRED)
#
# - Version 1.2 is included and writes LZW GIF (-DUSE_GD_GIF
-DUSE_GD_SWAP_XY).
# - Versions 1.3 to 1.5 write non-LZW GIF (-DUSE_GD_GIF).
# - Versions 1.6 and greater write PNG (-DUSE_GD_PNG). Add -lpng -lz to
GD_LIB line.
# - Versions 1.8 (or was it 1.7?) also supports JPEG and WBMP
(-DUSE_GD_JPEG -DUSE_GD_WBMP)
#
# The following lines will compile GD 1.2:
#GDFONT_OBJ= gd-1.2/gdfontt.obj gd-1.2/gdfonts.obj gd-1.2/gdfontmb.obj \
# gd-1.2/gdfontl.obj gd-1.2/gdfontg.obj
#GD_INC= -I./gd-1.2
#GD_LIB= gd-1.2/gd.lib
#GD= -DUSE_GD_GIF -DUSE_GD_SWAP_XY
#MAKE_GD=gd
# A patched version of GD that supports GIF, JPEG, PNG and WBMP can be
# downloaded from http://www.rime.com.au/gd/.
# The following defns will include the patched GD 1.8.4 with TTF:
GDFONT_OBJ=
GD_INC= -I./gd-2.0.1
GD_LIB= ./gd-2.0.1/gd.lib ./jpeg-6b/libjpeg.lib ./libpng120/libpng.lib \
./zlib-1.1.3/zlib.lib ./freetype-2.0.1/objs/freetype204mt.lib
GD= -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_TTF \
-DUSE_GD_TTF -DGD_HAS_GDIMAGEGIFPTR
MAKE_GD=gd
# TIFF distribution (raster support for TIFF and GEOTIFF
imagery).(RECOMMENDED)
TIFF_INC=-I./tiff-v3.5.6-beta/libtiff
TIFF_LIB=./tiff-v3.5.6-beta/libtiff/libtiff.lib
TIFF=-DUSE_TIFF
# JPEG distribution (raster support for grayscale JPEG images, INPUT ONLY).
#JPEG_INC=
#JPEG_LIB=-ljpeg
#JPEG=-DUSE_JPEG
# EPPL7 Support (this activates ERDAS as well) Included in the distribution.
Probably the best raster alternative if
# you've got EPPL7 laying around. See http://www.lmic.state.mn.us/ for more
information. (RECOMMENDED)
EPPL=-DUSE_EPPL
EPPL_OBJ=epplib.obj
# OGR Support OGC Simple Feature inspired interface for vector
# formats. See http://gdal.velocet.ca/projects/opengis/
GDAL_DIR= ./gdal-1.1.5
OGR=-DUSE_OGR
OGR_LIB = $(GDAL_DIR)/ogr/ogrsf_frmts/ogrsf_frmts.lib
$(GDAL_DIR)/ogr/ogrsf_frmts/ogrsf_frmts_sup.lib $(GDAL_DIR)/ogr/ogr.lib
$(GDAL_DIR)/ogr/../port/cpl.lib
OGR_INC = -I$(GDAL_DIR)/ogr/ogrsf_frmts -I$(GDAL_DIR)/ogr
-I$(GDAL_DIR)/ogr/../port
# ESRI SDE support.
#SDE_OPT=-DUSE_SDE
#SDE_INC=-I../arcsde/include
#SDE_LIB=../arcsde/lib/sde80.lib ../arcsde/lib/sg80.lib
../arcsde/lib/pe80.lib
#
# UofMN GIS/Image Processing Extension (very experimental)
#
#EGIS=-DUSE_EGIS
#ERR_OBJ=./errLog/errLog.o
#ERR_INC=-I./errLog
#ERR_LIB=-L./errLog -lerrLog
#IMGGEN_OBJ=./imgSrc/imgLib.o
#IMGGEN_INC=-I./imgSrc
#IMGGEN_LIB=-L./imgSrc -limgGEN
#
# VC++ does not include the REGEX library... so we must provide our one.
# The following definitions will try to build GNU regex-0.12 located in the
# regex-0.12 sub-directory.
# If it was not included in the source distribution, then you can get it
from:
# ftp://ftp.gnu.org/pub/gnu/regex/regex-0.12.tar.gz
#
REGEX_OBJ=.\regex-0.12\regex.obj
REGEX_INC=-I./regex-0.12
#
# IMPORTANT NOTE ABOUT REGEX FOR PHP_MAPSCRIPT USERS:
#
# If you want to compile the PHP_MAPSCRIPT module, then you have to make
# MapServer uses the same version of the REGEX library that PHP was
# compiled with:
#
#PHP_REGEX=..\php-3.0.14\regex
#PHP_REGEX=..\php-4.0.6\regex
#REGEX_OBJ=$(PHP_REGEX)\regcomp.obj $(PHP_REGEX)\regerror.obj \
# $(PHP_REGEX)\regexec.obj $(PHP_REGEX)\regfree.obj
#REGEX_INC=-I$(PHP_REGEX) -DPHP_NO_ALIASES
#
# REGEX needs some special flags... here they are for VC++ 6.0
#
REGEX_OPT=-DHAVE_STRING_H -DREGEX_MALLOC
#
# --- You shouldn't have to edit anything else. ---
#
#
# Main MapServer library.
#
MS_LIB = mapserver.lib
MS_OBJS = mapbits.obj maphash.obj mapshape.obj mapxbase.obj \
mapparser.obj maplexer.obj mapindex.obj maptree.obj \
mapsearch.obj mapstring.obj mapsymbol.obj mapfile.obj \
maplegend.obj maputil.obj mapscale.obj mapquery.obj \
maplabel.obj maperror.obj mapprimitive.obj mapproject.obj\
mapraster.obj cgiutil.obj mapsde.obj mapogr.obj \
mappostgis.obj maplayer.obj mapresample.obj mapwms.obj \
mapwmslayer.obj mapgml.obj\
$(EPPL_OBJ) $(REGEX_OBJ)
MS_HDRS = map.h mapfile.h
MS_EXE = mapserv.exe shp2img.exe legend.exe \
shptree.exe scalebar.exe sortshp.exe tile4ms.exe
#
#
#
LIBS = $(MS_LIB) $(GD_LIB) $(TIFF_LIB) $(JPEG_LIB) \
$(PROJ_LIB) $(ERR_LIB) $(IMGGEN_LIB) $(OGR_LIB)
INCLUDES = $(GD_INC) $(TIFF_INC) $(JPEG_INC) \
$(PROJ_INC) $(ERR_INC) $(IMGGEN_INC) $(REGEX_INC) $(OGR_INC)
CFLAGS = $(BASE_CFLAGS) $(INCLUDES) $(REGEX_OPT) $(STRINGS) \
$(EPPL) $(PROJ) $(TIFF) $(JPEG) $(GD) $(OGR) $(WMS)
default: all
all: $(MAKE_GD) $(MS_LIB) $(MS_EXE)
$(MS_OBJS): $(MS_HDRS)
$(MS_LIB): $(MS_OBJS)
copy $(GDAL_DIR)\gdal.pdb .
lib /out:$(MS_LIB) $(MS_OBJS)
$(MS_EXE): $(LIBS)
gd::
cd gd-2.0.1
nmake /f makefile.nt gd.lib OPTFLAGS="$(OPTFLAGS)"
cd ..
.c.obj:
$(CC) $(CFLAGS) /c $*.c /Fo$*.obj
.cpp.obj:
$(CC) $(CFLAGS) /c $*.cpp /Fo$*.obj
.c.exe:
$(CC) $(CFLAGS) /c $*.c /Fo$*.obj
$(LINK) $(LDFLAGS) $*.obj $(LIBS)
.cpp.exe:
$(CC) $(CFLAGS) /c $*.cpp /Fo$*.obj
$(LINK) $(LDFLAGS) $*.obj $(LIBS)
clean:
del *.obj
del $(REGEX_OBJ)
del $(MS_LIB)
del $(MS_EXE)
del *.pdb
del *.exp
del *.ilk
cd gd-1.2
nmake -f makefile.nt clean
cd ..
cd gdft
nmake -f makefile.vc clean
cd ..
MAKEFILE.NT for GD-2.0.1
#NMAKE makefile for Windows 95/98/NT developers.
#Produces a static library (libgd.lib). Thanks to Joe Gregorio.
#THIS IS OUT OF DATE.
COMPILER=cl
#If the ar command fails on your system, consult the ar manpage
#for your system.
AR=LIB
#If the install command is not in your path, provide
#an explicit path for it here, or install manually.
INSTALL=install
#If you don't have FreeType and/or Xpm installed, including the
#header files, uncomment this (default).
CFLAGS=-Ox -GX
#If you do have FreeType and/or Xpm fully installed, uncomment a
#variation of this and comment out the line above. See also LIBS below.
#CFLAGS=-O -DHAVE_LIBJPEG -DHAVE_LIBPNG -DHAVE_LIBFREETYPE
# -DHAVE_LIBFREETYPE can be used instead of -DHAVE_TTF to use the
# newer FreeType2 libraries
#Libraries required for applications
#LIBS=gd.lib libpng.lib zlib.lib
LIBS=gd.lib ../lpng120/libpng.lib ../zlib-1.1.3/zlib.lib \
../jpeg-6b/libjpeg.lib ../freetype-2.0.4/objs/freetype204mt.lib
#Libraries required for gd.lib itself
GDLIBS=../lpng120/libpng.lib ../zlib-1.1.3/zlib.lib \
../jpeg-6b/libjpeg.lib ../freetype-2.0.4/objs/freetype204mt.lib
#Typical install locations for freetype, zlib, jpeg, xpm and
#libpng header files. If yours are somewhere else, change this.
#INCLUDEDIRS=-I d:\zlib -I d:\libpng -I d:\libjpeg -I d:\libttf
INCLUDEDIRS=-I../zlib-1.1.3 -I../lpng120 -I../jpeg-6b \
-I../freetype-2.0.4/objs
-I../freetype-2.0.4/include/freetype \
-I../freetype-2.0.4/include
#Typical install locations for freetype, zlib, xpm, libjpeg and
#libpng libraries.
#
#If yours are somewhere else, other than a standard location
#such as /lib or /usr/lib, then change this. Be sure to keep
#-L. as this allows the gd library itself to be found.
#Put -L. first so that old versions of the gd library elsewhere
#on your system can't cause conflicts while building a new one.
#LIB=d:\devstudio\vc\lib;d:\zlib;d:\libpng;d:\libjpeg;d:\libttf
LIBDIRS=
#Location where gd.lib should be installed by "make install".
INSTALL_LIB=/usr/local/lib
#Location where .h files should be installed by "make install".
INSTALL_INCLUDE=/usr/local/include
#Location where useful non-test programs should be installed by "make
install".
INSTALL_BIN=/usr/local/bin
#
#
# Changes should not be required below here.
#
#
VERSION=1.8.1
CC=$(COMPILER) $(INCLUDEDIRS)
LINK=$(CC) $(LIB) $(LIBS)
PROGRAMS=$(BIN_PROGRAMS) $(TEST_PROGRAMS)
BIN_PROGRAMS=pngtogd.exe pngtogd2.exe gdtopng.exe gd2topng.exe
gd2copypal.exe gdparttopng.exe webpng.exe
TEST_PROGRAMS=gdtest.exe gddemo.exe gd2time.exe gdtestttf.exe gdtestft.exe
all: gd.lib $(PROGRAMS)
gddemo.exe: gddemo.c gd.lib
$(CC) gddemo.c $(LIBDIRS) $(LIBS)
pngtogd.exe: pngtogd.c gd.lib
$(CC) pngtogd.c $(LIBDIRS) $(LIBS)
webpng.exe: webpng.c gd.lib
$(CC) webpng.c $(LIBDIRS) $(LIBS)
pngtogd2.exe: pngtogd2.c gd.lib
$(CC) pngtogd2.c $(LIBDIRS) $(LIBS)
gdtopng.exe: gdtopng.c gd.lib
$(CC) gdtopng.c $(LIBDIRS) $(LIBS)
gd2topng.exe: gd2topng.c gd.lib
$(CC) gd2topng.c $(LIBDIRS) $(LIBS)
gd2copypal.exe: gd2copypal.c gd.lib
$(CC) gd2copypal.c $(LIBDIRS) $(LIBS)
gdparttopng.exe: gdparttopng.c gd.lib
$(CC) gdparttopng.c $(LIBDIRS) $(LIBS)
gdtest.exe: gdtest.c gd.lib
$(CC) gdtest.c $(LIBDIRS) $(LIBS)
gd2time.exe: gd2time.c gd.lib
$(CC) gd2time.c $(LIBDIRS) $(LIBS)
gdtestttf.exe: gdtestttf.c gd.lib
$(CC) gdtestttf.c $(LIBDIRS) $(LIBS)
gdtestft.exe: gdtestft.c gd.lib
$(CC) gdtestft.c $(LIBDIRS) $(LIBS)
#OBJS=gd.obj gd_gd.obj gd_gd2.obj gd_io.obj gd_io_dp.obj gd_io_file.obj
gd_ss.obj \
# gd_io_ss.obj gd_png.obj gdxpm.obj gdfontt.obj gdfonts.obj
gdfontmb.obj gdfontl.obj \
# gdfontg.obj gdtables.obj gdttf.obj gdft.obj gdcache.obj gdkanji.obj
gd_jpeg.obj
OBJS=gd.obj gdhelpers.obj gd_gd.obj gd_gd2.obj gd_io.obj gd_io_dp.obj
gd_io_file.obj gd_ss.obj \
gd_io_ss.obj gd_png.obj gdxpm.obj gdfontt.obj gdfonts.obj
gdfontmb.obj gdfontl.obj \
gdfontg.obj gdtables.obj gdttf.obj gdft.obj gdcache.obj gdkanji.obj
gd_jpeg.obj gd_wbmp.obj wbmp.obj
gd.lib: $(OBJS) gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h gdfontg.h
$(AR) $(OBJS) $(GDLIBS)
clean:
del *.obj *.lib $(PROGRAMS)
More information about the MapServer-users
mailing list