[Mapserver-users] compile error 3.4

Swaminathan, Gayathri gayathri at ou.edu
Tue Sep 23 10:04:28 EDT 2003


Sorry!
Dint see the version 3.4...

GD is 1.2? Are you not using the patched gd-1.8.4 from www.boutell.com/gd
instead?

Please not this in you makefile.vc

"##REGEX_OBJ=.\regex-0.12\regex.obj
##REGEX_INC=-I./regex-0.12"

It should be,

"##REGEX_OBJ=..\regex-0.12\regex.obj
##REGEX_INC=-I../regex-0.12"

Instead.

Are you certain on the regex? Regex is required you cannot comment that out
in your mapserver makefile.vc

And yes, everytime you make mapserver., do clean and then make. You will not
see errors correctly otherwise.

Pardon me for my superficial reply earlier...without seeing your version of
mapserver.

Thanks,
Gayathri


-----Original Message-----
From: Swaminathan, Gayathri [mailto:gayathri at ou.edu] 
Sent: Tuesday, September 23, 2003 8:19 AM
To: 'Mika Larronmaa'
Cc: 'mapserver-users at lists.gis.umn.edu'
Subject: RE: [Mapserver-users] compile error 3.4


Ah! Mika,

Looks like you are doing the same mistake that I did when I was trying to
compile mapserver 4.0

Version 4 build procedures have changed as follows:

1) There is a much leaner makefile.vc now.

2) All your library paths and include paths can be now set in nmake.opt that
comes with the mapserver download (like you do gdal)

So all you have to do is edit the nmake file to have your relative paths and
do nmake/f makefile.vc under your mapserver directory.

Attached with this email are my makefile and nmake files for your inference.

HTH,
Gayathri

-----Original Message-----
From: Mika Larronmaa [mailto:mika.larronmaa at gsf.fi] 
Sent: Tuesday, September 23, 2003 12:22 AM
To: Swaminathan, Gayathri
Subject: RE: [Mapserver-users] compile error 3.4


Hi Gayathri,

Mistake the announcement will come even though I have commented on the
makefile.vc of the section in question out of the file. Along makefile.vc is
a file according to which I have tried to compile the programme.



#
# 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.5 2001/01/09 05:29:00 dan Exp $ #

#OPTFLAGS =	/nologo /Zi /W3 /DDEBUG
OPTFLAGS =	/nologo /Zi
BASE_CFLAGS = 	$(OPTFLAGS)


#
# 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

# Freetype distribution (TrueType font support). Available at
http://www.freetype.org/. (RECOMMENDED) ##TTF_INC=-I../freetype/lib -I./gdft
##TTF_LIB=../freetype/lib/freetype.lib ./gdft/gdft.lib ##TTF=-DUSE_TTF
##TTF_GD=gdft

# Proj.4 distribution (cartographic projection routines). Not required for
normal use. (EXPERIMENTAL) ##PROJ_LIB=../proj/src/proj.lib
##PROJ_INC=-I../proj/src ##PROJ=-DUSE_PROJ

# GD distribution (graphics library GIF and/or PNG support). (REQUIRED) #
#   - Version 1.2 is included and writes LZW GIF (-DUSE_GD_1_2).
#   - Versions 1.3 to 1.5 write non-LZW GIF (-DUSE_GD_1_3).
#   - Versions 1.6 and greater write PNG (-DUSE_GD_1_6). Add -lpng -lz to
GD_LIB line.
#
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_1_2
MAKE_GD=gd

# TIFF distribution (raster support for TIFF and GEOTIFF
imagery).(RECOMMENDED)
##TIFF_INC=-I../tiff-v3.5.4/libtiff
##TIFF_LIB=../tiff-v3.5.4/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
##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

#
# 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.4\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 \
		$(EPPL_OBJ) $(REGEX_OBJ)

MS_HDRS = 	map.h mapfile.h

MS_EXE = 	mapserv.exe shp2img.exe legend.exe shpindex.exe \
		shptree.exe scalebar.exe sortshp.exe

#
#
#
LIBS	=	$(MS_LIB) $(GD_LIB) $(TIFF_LIB) $(JPEG_LIB) $(TTF_LIB) \
		$(PROJ_LIB) $(ERR_LIB) $(IMGGEN_LIB) $(OGR_LIB)

INCLUDES =	$(GD_INC) $(TIFF_INC) $(JPEG_INC) $(TTF_INC) \
		$(PROJ_INC) $(ERR_INC) $(IMGGEN_INC) $(REGEX_INC) $(OGR_INC)

CFLAGS =	$(BASE_CFLAGS) $(INCLUDES) $(REGEX_OPT) $(STRINGS)  \
		$(EPPL) $(PROJ) $(TTF) $(TIFF) $(JPEG) $(GD) $(OGR)

default: 	all

all:		$(MAKE_GD) $(TTF_GD) $(MS_LIB) $(MS_EXE)

$(MS_OBJS):	$(MS_HDRS)

$(MS_LIB):	$(MS_OBJS)
	lib /out:$(MS_LIB) $(MS_OBJS)

$(MS_EXE):	$(LIBS)

gd::
	cd gd-1.2
	nmake /f makefile.nt OPTFLAGS="$(OPTFLAGS)"
	cd ..

gdft::
	cd gdft
	nmake /f makefile.vc 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
	$(CC) $*.obj $(LIBS)

.cpp.exe:
	$(CC) $(CFLAGS) /c $*.cpp /Fo$*.obj
	$(CC) $*.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 ..

-----Original Message-----
From: Swaminathan, Gayathri [mailto:gayathri at ou.edu]
Sent: 22. syyskuuta 2003 16:30
To: 'Mika Larronmaa'; mapserver-users at lists.gis.umn.edu
Subject: RE: [Mapserver-users] compile error 3.4


Thanks,
Mika


Seems like regex related errors. Are you having the right  path to regex in
your makefile.vc and are you having the regex.obj built before building
mapserver?

Thanks,
Gayathri

-----Original Message-----
From: Mika Larronmaa [mailto:mika.larronmaa at gsf.fi]
Sent: Monday, September 22, 2003 6:24 AM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] compile error 3.4


Hi,

What's wrong? when i trying compile(windows xp pro) version 3.4 i get
following errors.



cd gd-1.2
	nmake /f makefile.nt OPTFLAGS="/nologo /Zi"
	cl gddemo.obj -o gddemo	/link /LIBPATH:. gd.lib
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:gddemo.exe
/out:gddemo.exe
/LIBPATH:.
gd.lib
gddemo.obj
	cl giftogd.obj -o giftogd	/link /LIBPATH:. gd.lib
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:giftogd.exe
/out:giftogd.exe
/LIBPATH:.
gd.lib
giftogd.obj
	cl webgif.obj -o webgif	/link /LIBPATH:. gd.lib
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:webgif.exe
/out:webgif.exe
/LIBPATH:.
gd.lib
webgif.obj
	cd ..
	cl /nologo
/gd-1.2           -DNEED_STRCASECMP -DNEED_STRNCASECMP        -DUSE_GD_1_2
/c mapserv.c /Fomapserv.obj
mapserv.c
	cl mapserv.obj mapserver.lib gd-1.2/gd.lib
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:mapserv.exe
mapserv.obj
mapserver.lib
gd-1.2/gd.lib
mapserv.obj: error LNK2001: unresolved external symbol _regfree
mapserver.lib(mapfile.obj): error LNK2001: unresolved external symbol
_regfree
mapserver.lib(mapquery.obj): error LNK2001: unresolved external symbol
_regfree
mapserver.lib(mapparser.obj): error LNK2001: unresolved external symbol
_regfree mapserv.obj : error LNK2001: unresolved external symbol
_strncasecmp mapserv.obj : error LNK2001: unresolved external symbol
_regcomp
mapserver.lib(mapfile.obj): error LNK2001: unresolved external symbol
_regcomp
mapserver.lib(mapquery.obj): error LNK2001: unresolved external symbol
_regcomp
mapserver.lib(mapparser.obj): error LNK2001: unresolved external symbol
_regcomp mapserv.obj : error LNK2001: unresolved external symbol _strcasecmp
mapserver.lib(mapfile.obj): error LNK2001: unresolved external symbol
_strcasecmp
mapserver.lib(maputil.obj): error LNK2001: unresolved external symbol
_strcasecmp
mapserver.lib(mapparser.obj): error LNK2001: unresolved external symbol
_regexec mapserv.obj : error LNK2001: unresolved external symbol _regexec
mapserver.lib(mapfile.obj): error LNK2001: unresolved external symbol
_regexec
mapserver.lib(mapquery.obj): error LNK2001: unresolved external symbol
_regexec
mapserver.lib(maputil.obj): error LNK2001: unresolved external symbol
_regexec mapserv.exe : fatal error LNK1120: 5 unresolved externals

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users






More information about the mapserver-users mailing list