问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

如何编译mapserver在windows环境下

发布网友 发布时间:2022-04-26 17:44

我来回答

1个回答

热心网友 时间:2022-04-12 00:10

编译mapserver的时候一定要选择一个根目录
推荐 C 盘
在C盘下面创建一个projects目录
将你的所以用来支持mapserver编译的支持库文件都放到该目录下面
注:由于mapserver等都是开源的软件。但是都有一定的版权。所以他们不是集成到mapserver下面的,而是有各种支持库文件通过编译说明文件链接
所有文件链接的说明文件在nmake.opt文件中。这是使用vc编译的说明文件。在编译的时候具体选择支持什么库文件都可以在这里说明。

下面是具体的编译环境
gdwin32 的bgd.lib是第一次编译后拷贝过来的运行makemsvcimport.bat
libpng 的libpng.lib,libpngd.lib是第一次编译后拷贝过来的vc6
freetype 的freetype2110_D.lib在vc7下面编译成功
zlib zlib.lib 编译成功在zlib123\contrib\vstudio\vc7用vc7
proj proj.lib 在vc7环境下编译成功
curl libcurl.lib 在vc6编译下成功 C:\projects\curl\lib
gdal gdal.lib 用submake.bat批处理文件执行编译成功
pdflib 用vc7编译成功 C:\projects\PDFlibLite
fcgi 没有成功 将fcgi_config_x86.h改为fcgi_config.h用vc6编译成功
jpeg 没有编译成功将gdal里的拷贝过来
regex 没有编译成功
编译支持库的时候比较艰难
仔细细心的查看各个支持库中的文档目录。一般都会有一个可以通过的编译。
编译的时候也要懂得使用技巧。比如他说找不到库文件或着什么头文件或源文件你都可以从其他地方拷贝一个过来。

附加nmake.opt文件的配置
#
# nmake.opt - MapServer 4.x configuration for MSVC++
#
# This VC++ configuration is used in building 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: nmake.opt,v 1.24 2005/12/08 19:14:48 hobu Exp $
#
# Contents:
# Section I: Mapserver Options (you may want to edit)
# Section II: Support Libraries (you must edit)
# Section III: Debug Flags (no need to edit)
# Section IV: Variable Setup (should not need to edit)
# Section V: UMN GIS System Setup (should not need to edit)
# Section VI: Collect compiler flags
#
########################################################################
# Section I: Mapserver Options
########################################################################
# Uncomment the following to link mapserv.exe withh dll
DLLBUILD=1
# Set the following to point to the current directory.
MS_BASE = C:\projects\mapserver
# Optmization and related compile flags.
# Optimized, with using MSVCRT.
OPTFLAGS = /nologo /MD $(WARNING_LEVEL) $(DEBUG)
#LDFLAGS = /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcd /DEBUG
# Debug with MSVCRT
#OPTFLAGS = /nologo /Zi /MD $(WARNING_LEVEL) $(DEBUG)
# Optimized, with LIBC.
#OPTFLAGS = /nologo $(WARNING_LEVEL) $(DEBUG)
# Input raster format options:
#
# The lite version of mapserver 4.x supports only GIF, PNG and JPEG data for
# input. If you wish to support many geospatial raster formats for input
# you will need the GDAL support library from http://www.gdal.org/.
# Once built, enable the GDAL flag, and point GDAL_DIR to the directory
# where GDAL was built.
#GDAL=-DUSE_GDAL
#GDAL_DIR=c:\projects\gdal
#
# Input vector format options
#
# The lite version of Mapserver 4.x only suports ESRI shapefiles for input.
#
# The OGR library (part of GDAL) supports a variety of geospatial vector
# formats including mapinfo, Arc/Info binary coverages, S-57, SDTS,
# Microstation DGN (pre-v7), TIGER, UK .NTF. It also include support for
# treating non-spatial tablular data from ODBC, CSV, mysql, Oracle Spatial,
# and PostgreSQL as spatial table with use of the VRT (virtual) driver.
#
# NOTE: Both -DUSE_OGR and -DUSE_GDAL need to be defined if you want to
# use GDAL/OGR for both raster and vector support, but GDAL_DIR needs only
# be defined once.
#
#OGR=-DUSE_OGR
#GDAL_DIR=c:\projects\gdal
# JPEG Input:
# JPEG input for raster layers is also available through GDAL, If you wish
# to build support for JPEG without GDAL, uncomment the following flag
# and provide the full path to the jpeg support library project directory.
# See http://www.ijg.org/ for support library.
JPEG=-DUSE_JPEG
JPEG_DIR=c:/projects/libjpeg
# Output format options:
# If you wish to allow JPEG output maps, uncomment the following flag.
# If not using a GD build with an internal copy of libjpeg, you will
# also need to uncomment JPEG_DIR and point to it; however, with BGD.DLL
# that is not necessary.
OUTPUT_JPEG=-DUSE_GD_JPEG
JPEG_DIR=c:/projects/libjpeg
# If you wish to allow PNG output maps, uncomment the following flag.
# If not using a GD build with an internal copy of libpng, you will
# also need to uncomment PNG_DIR and ZLIB_DIR and point to it; however, with
# BGD.DLL that is not necessary.
# See http://www.libpng.org/pub/png/libpng.html for support library.
# See http://www.gzip.org/zlib/ for support library.
OUTPUT_PNG=-DUSE_GD_PNG
PNG_DIR=c:/projects/libpng
ZLIB_DIR=c:/projects/zlib
#flag to indicate the use of zlib library. It is used intially in SVG
#output to compressed files.
ZLIB=-DUSE_ZLIB
# If you wish to allow Windows BMP output maps, uncomment the following flag.
OUTPUT_WBMP=-DUSE_GD_WBMP
# If you wish to have FLASH output, uncomment the following flag and provide
# the full path to the MING support library project directory.
# See http://ming.sourceforge.net/ for support library.
#MING=-DUSE_MING_FLASH
#MING_DIR=c:/projects/ming-0.3beta1

# If you wish to have PDF output, uncomment the following flag and provide the
# full path to the PDF support library project directory.
# See http://www.pdflib.com/ for support library.
PDF=-DUSE_PDF
PDF_DIR=c:/projects/PDFlibLite

# Annotation fonts.
#
# If you wish to annotate your maps with true type fonts unccomment the
# following flag. Provide the full path to the FreeType 2.x external
# support library, unless it is provided within your GD build as is the
# case with BGD.DLL.
# See http://www.freetype.org for support library.
ANNOTATION_FT=-DUSE_GD_FT
FT_DIR=c:/projects/freetype

# Direct connectivity to Postgresql PostGIS.
#
# To turn on direct connectivity to Postgresql PostGIS uncomment the following
# flag and set the full path name to the project directory for the
# Postgresql native Win32 client library.
# See http://www.postgresql.org for support library.
#POSTGIS =-DUSE_POSTGIS
#POSTGIS_DIR =c:/projects/libpq
#Orcale
ORACLE_DIR = c:\Oracle\Ora81
ORACLE=-DUSE_ORACLESPATIAL
# Direct connectivity to ArcSDE.
#
# To turn on direct connectivity to ArcSDE uncomment the following
# flag and set the full path name to the project directory for ArcSDE.
# Since ESRI includes the version number in the name of their libraries
# you may need to change that number in Section III of this configuration
# file.
# See http://www.esri.com/software/arcgis/arcinfo/arcsde/index.html for
# support library
#
#
#SDE_OPT=-DUSE_SDE -DWIN32
#SDE_DIR=c:/my_path_to/arcsde
# EPPL7 Support
#
# This activates ERDAS as well. It is 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.
# Uncomment out the following flag and set the full path name to the
# epplib.obj file.
#EPPL=-DUSE_EPPL
#EPPL_OBJ=c:/my_path/epplib.obj
# 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
# If you want to use shape Z and M parameter this option must be set.
# It's OFF by default.
#USE_POINT_Z_M=-DUSE_POINT_Z_M
USE_POINT_Z_M=
#NEED_NONBLOCKING_STDERR=-DNEED_NONBLOCKING_STDERR
ENABLE_STDERR_DEBUG=-DENABLE_STDERR_DEBUG
# If you want antialiasing (note that It requires gd2)
USE_GD_ANTIALIAS=-DUSE_GD_ANTIALIAS
# Enable if you want thread safe locking, not needed for simple CGI.
#THREADS=-DUSE_THREAD
# Use this flag to compile with WMS Server support.
# To find out more about the OpenGIS Web Map Server Specification go to
# http://www.opengis.org/
WMS=-DUSE_WMS_SVR
# Use this flag to compile with WMS Client support. WMS Client support
# allows you to pull layers from other OGIS WMS servers on the interent and
# incorporate them into your map.
# To find out more about the OpenGIS Web Map Server Specification go to
# http://www.opengis.org/
# you need the libcurl library from http://curl.haxx.se/library/c/
# Set the full path to the curl project directory.
# You may also need to the full path to the windows socket library.
#WMSCLIENT= -DUSE_WMS_LYR
CURL_DIR=c:/projects/curl
#CURL_DIR=c:/projects/curl-7.10.7
WINSOCK_LIB = "WSOCK32.LIB"
WINSOCK_LIB = "C:\Program Files\Microsoft Visual Studio\VC98\Lib\WSOCK32.LIB"
# Use -DUSE_WFS_SVR to compile with WFS server support, requires OGR and PROJ4
#WFS=-DUSE_WFS_SVR
# Use -DUSE_WFS_LYR to compile with WFS client support, requires libcurl
#WFSCLIENT= -DUSE_WFS_LYR
# Use -DUSE_WCS_SVR to compile with WCS server support, requires GDAL.
#WCS=-DUSE_WCS_SVR
#libiconv support is used for to support double bytes (see bug 911).
#uncomment the following to build with libiconv support.
#ICONV=-DUSE_ICONV
#
# Reprojecting.
# If you would like mapserver to be able to reproject data from one
# geographic projection to another, uncomment the following flag
# Proj.4 distribution (cartographic projection routines). PROJ.4 is
# also required for all OGC services (WMS, WFS, and WCS).
#
# For PROJ_DIR use full path to Proj.4 distribution
PROJ=-DUSE_PROJ -DUSE_PROJ_API_H
PROJ_DIR=c:\projects\proj
# PHP Mapscript.
# If you plan to build PHP mapscript uncomment the following flag and
# set the full path to the PHP project directory
#PHP=1
#PHP_DIR=c:\projects\php-4.3.4
# Apparently these aren't as commonplace. Edit the
# following line to reflect the missing functions on your platform.
#
#STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRDUP
STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRLCAT

########################################################################
# Section II: External Support Libraries
########################################################################
# You will need to set the paths to various support library projects
# that you have compiled.
为什么我在我的电脑那要打开D、E、F盘时。

首先,autorun.inf这个文件是很早就存在的,在WinXP以前的其他windows系统(如Win98,2000等),需要让光盘、U盘插入到机器自动运行的话,就要靠autorun.inf。这个文件是保存在驱动器的根目录下的(是一个隐藏的系统文件),它保存着一些简单的命令,告诉系统这个新插入的光盘或硬件应该自动启动什么程序,也可以告诉系统让系统将它...

我的机子老是弹出:“加载c;\Windows\system32\guard.tmp时出错”_百度...

C:\Windows\mapserver.exe C:\Windows\system\ntdllf.exe C:\Windows\system\ntdllfnt.exe C:\Windows\system\mainsv.exe C:\Windows\system32\guard.tmp C:\WIndows\system32\i 总共应该有30来个病毒文件。你可以下载最新的杀毒软件查杀。若没有发现可疑进程则该病毒是*.DLL型嵌入式的病毒或木马...

我的windows的组件选项不见了

查找文件%systemroot%\inf\sysoc.inf(\windows\inf\sysoc.inf)双击打开,可以查看到FREE:[Version]Signature = "$Windows NT$"DriverVer=10/01/2002,5.2.3790.3959 [Components]NtComponents=ntoc.dll,NtOcSetupProc,,4 WBEM=ocgen.dll,OcEntry,wbemoc.inf,hide,7 WBEMMSI=wbemupgd.dll,OcEntry...

浏览网页时屏幕老是出现加载C:\Windows\system32\guard.tmp时出错拒 ...

C:\Windows\mapserver.exe C:\Windows\system\ntdllf.exe C:\Windows\system\ntdllfnt.exe C:\Windows\system\mainsv.exe C:\Windows\system32\guard.tmp C:\WIndows\system32\i 总共应该有30来个病毒文件。你可以下载最新的杀毒软件查杀。若没有发现可疑进程则该病毒是*.DLL型嵌入式的病毒或木马...

跪求csrss.exe的清除方法

C:\Windows\mapserver.exe C:\Windows\system\ntdllf.exe C:\Windows\system\ntdllfnt.exe C:\Windows\system\mainsv.exe C:\Windows\system32\guard.tmp C:\WIndows\system32\i 总共应该有30来个病毒文件。2.用WIN98启动盘重启,如果C盘采用NTFS分区格式,还需要相应的工具。将找到的病毒文 件...

ArcGIS Server10.4安装教程

具体步骤如下:1、右键以管理员身份运行安装文件ArcGIS_for_Server_Windows_1041_151921.exe。2、在安装过程中,自动检测工具并选择默认路径继续。3、待检测工具安装完成,点击窗口中的"Next"按钮。4、选择安装路径后,再次点击"Next"。5、自动安装Python,选择默认路径并继续。6、配置Server账户时,建议...

17个开源GIS软件,看你用过几个?

GeoServer支持OGC标准规范的系列服务,支持PostgreSQL、MySQL等数据库,以及ArcSDE、ShapeFile等中间件和文件资源,能够将网络地图输出为JPEG、PNG、KML等多种图片和数据格,可以运行在任何基于J2EE/Servlet的容器之上,支持多种客户端框架,如Openlayers等。 4、MapServer MapServer是美国明尼苏达大学在20世纪90年代利用C语言开发...

backdoor.iedown.a是什么病毒

WINDOWS\mapserver.exe WINDOWS\SYSTEM\mainsv.exe WINDOWS\SYSTEM\ptsnopt.exe 5、病毒激活后会自动、定时检测文件夹属性设置,如不符合以下设置,则更改为:不显示隐藏文件和文件夹、隐藏已知文件类型扩展名、不显示受保护的操作系统文件 清除方法:1。关闭系统还原 2。进入安全模式使用杀毒软件查杀 3。

如何手工清除“夜叉”病毒类型autorun.inf及Iexplores.exe进程为pctmai...

本软件可以在DOS下查杀病毒。使用鼠标或ALT+字母可以对杀毒软件扫描文件类型进行具体设置。按A、C、D等选择扫描的硬盘。注意,如果系统引导文件等重要文件感染病毒清除后,可能会因为文件的损坏而无法启动系统。这是因为病毒损坏了Windows系统的文件,需要重新安装系统或修复系统才可以。本光盘没有系统安装功能...

移动地理信息系统的开发平台

UCMap 是当前主流的移动GIS开发组件,延伸GIS 在移动端的应用,提供了Android、iOS、Windows 8等系统下的开发包SDK、DEMO演示程序和相关文档,便于开发人员在手机或平板电脑上建立移动GIS应用。UCMap技术优势:1,支持大数据量的离线矢量地图和影像,且地图浏览速度远超其他GIS平台;2,拥有丰富的矢量交互...

windows下编译ffmpeg ffmpeg windows编译 imx6 windows编译 windows编译linux windows编译linux程序 windows编译linux内核 windows交叉编译linux windows编译 windows编译c程序
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
...并指出反应的类型.(1)电解水___;(2)红磷在氧气中燃烧__ 玩游戏老是跳出来 求 解决办法 金庸群侠传5一直跳出闪退怎么解决介绍_金庸群侠传5一直跳出闪退怎么解 ... 我一玩单机游戏就跳出到桌面,这是啥问题。。。 高手帮忙解决:电脑玩游戏老是跳出桌面。。 杭州有哪些推荐假期入住的宝藏度假酒店? 子衿主要思想内容 90后研究生坚守山区一人教6科,具体是什么情况? 苏明娟特殊名人 一桶菜油连桶重940克倒出油的一半后连桶重490克桶和油各重多少克 火腿肠对我们有害吗 C语言 仓库库存货物管理系统 最近网络有一段视频,是把猪啊,整条放下去,连猪毛啊猪屎都有放进去,然后做成火腿肠香肠真的吗? 小狗:火腿肠作文 怎样使GeoServer在WMS的GetFeatureInfo请求返回JSON格式数据 自己在家玩,不小心火腿肠断在里面,怎么办? 怎样通过ajax进行wms请求 SKU是指料件数量吗?什么是WMS 猫咪抱着火腿肠玩儿不吃是怎么回事 刚才把火腿肠的包装皮剥掉之后拿着插进去玩了一会断了半截在里面,怎么取出来? 我和我老公结婚三年了、之前还好、可现在只要我做错事就打我*、还要用火腿肠塞*、好* 干拌面里的韭菜是怎么做的 韭菜鸡蛋热捞面怎么做好吃 韭菜鸡蛋捞面怎么做好吃,韭菜鸡蛋捞面的家 韭菜豆腐拌面怎样做呢 电子签名的适用范围有哪些? 韭菜肉片拌面怎么做 好吃的韭菜拌面怎么做好吃又简单,做法图 电子签章与传统签章相比有什么区别? word生成文书电子签章后用什么工具改 面对火腿肠的*,警犬“黑龙”淡定自如,赢得了网友怎样的称赞? 火腿肠两天了给狗吃了 会吐不 它老翻来覆去的饶什么东西 乱吃家伙 没打虫子和传染抗体 也带它出去玩? 去游乐园要带什么吃的好? 出国可以带火腿肠等肉制品上飞机吗? 猫咪吃火腿肠好吗? 抢红包,关火腿肠什么事? 樱桃季节到了,求了解樱桃品种以及哪个品种味道较好 大将军樱桃和美国红哪个品种好 美国大红樱桃裂果重吗 美国红樱桃是北美樱桃木吗 海参几年的营养价值高? 一只海参的营养价值 30克以上大樱桃品种是什么? 海参的营养功效有什么? excel表格里怎么添加图片 牛肉炖土豆胡萝卜的做法步骤图,怎么做好吃 空气炸锅怎么烤板栗 板栗用空气炸锅多长时间 柚见百香的做法步骤图,柚见百香怎么做好吃 萝卜的做法,牛肉炖土豆胡萝卜怎么做好吃