mapserver4.8.3艰难的编译过程!不保证看得懂喔

支持库编译:要求在vc7的release下编译生成
1.freetype 的freetype221.lib在vc7下面编译成功 - release版本
方法:调用builds->win32->visualc下的工程文件编译生成输出位置在objs 、objs\relese下
2.gd-2.0.33 在Dos下运行运行makemsvcimport.bat可生成bgd.lib -通过
3.gdal gdal.lib 用submake.bat批处理文件执行编译 -成功 注意:是gdal1.3.1版(gdal131.zip),gdal1.3.2版编译有问题
4.proj 在src文件夹下 Dos command line "nmake /f makefile.vc" - 成功 生成的exe,lib,dll,obj在src下
5.The regex-0.12 code is actually built by the MapServer build process, so you don't need to do anything there.
(regex-0.12由MapServer 自行编译,你不需要做任何事)
6.zlib zlib.lib 编译成功在C:\Projects\mapserver_4_8\zlib-1.2.3\projects用vc7编译成功
7.libpng 的libpng.lib,libpngd.lib是在C:\Projects\mapserver_4_8\libpng-1.2.10\projects\visualc6(vc6)下可以编译
8.jpeg编译比较麻烦,可参照其install.doc中的下部第23页中的一段话
 To use:
 <1>. Copy jconfig.vc to jconfig.h, makelib.ds to jpeg.mak, and
    makeapps.ds to apps.mak.  (Note that the renaming is critical!)
 <2>. Click on the .mak files to construct project workspaces.
    (If you are using DevStudio more recent than 4.2, you'll probably
    get a message saying that the makefiles are being updated.)
 <3>. Build the library project, then the applications project.
 <4>. Move the application .exe files from `app`\Release to an
    appropriate location on your path.
 <5>. To perform the self-test, execute the command line
  NMAKE /f makefile.vc  test

         拷贝libjpeg.lib到默认目录下NMAKE /f makefile.vc就可以使用了 - 成功通过
9.PostGIS 库
下载PostGIS 支持-官方下载网站http://www.postgresql.org
Compiling MapServer with PostGIS support
To compile PostGIS support into MapServer, here's what you need to do:
1. download the PostgreSQL 8.0.1 sources (postgresql-8.0.1.tar.gz) eg from:
ftp://ftp.heanet.ie/pub/postgresql/source/v8.0.1/postgresql-8.0.1.tar.gz
2. I extracted them to C:\projects\postgresql-8.0.1
3. download the Microsoft Platform SDK (250 Mb!) from
   http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
   otherwise you get link errors on shfolder.lib.
4. compile libpq under C:\projects\postgresql-8.0.1\src\interfaces\libpq
   using the win32.mak makefile
5. copy everything from C:\projects\postgresql-8.0.1\src\interfaces\libpq\release
   to C:\projects\postgresql-8.0.1\src\interfaces\libpq as the Mapserver
   makefile will try to find it there
6. Define the following in the nmake.opt for Mapserver:
   POSTGIS =-DUSE_POSTGIS
   POSTGIS_DIR =c:/projects/postgresql-8.0.1/src
7. nmake /f makefile.vc
8. don't forget to copy libpq.dll (from
   C:\projects\postgresql-8.0.1\src\interfaces\libpq\release)
   into a location where Mapserver can find it.

----------------------------------------------------------------------------
mapserver 主程序编译
注:::
用 vc7.0编译时会出现msvcrt.lib与libc.lib中的某些东西重定义问题
需要修改makefile.vc文件中的
$(MS_DLL) $(MS_LIB_DLL): $(MS_LIB)
 link /dll $(LDEBUG) \
    $(MS_OBJS) $(EXTERNAL_LIBS) /def:mapserver.def \
    /out:$(MS_DLL) /implib:$(MS_LIB_DLL)
在最后面添加一句 /NODEFAULTLIB:libc(忽略此库)

c:\projects\mapserver-mini编译通过具体设定如下:
此版本中使用vc7编译环境,即使用setvc7.bat命令,"C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat"
只用到了gd库、regex库、jpeg库、freetype库。

------------------------------------------------------------------------------------------------------------------------
添加proj-4库 - 成功
添加gdal库 - 失败 -
---------------------
2006/07/06晚11点
重新开始,只编译gdal库 - 通过 "但加入OGR功能支持就不行"
编译 gdal-1.3.2 + proj-4.4.9通过
2006/07/07
编译gdal-1.3.2 + proj-4.4.9 + libpng-1.2.10 + zlib-1.2.3(没有使用OGR选项) vc7.0编译环境setvc7.bat
注意:可以使用 nmake /f makefile.vc clean 清除生成的文件

如果加入OGR选项,则会出现
--------------------------------------------------
2006/07/10
编译mapscript/java 失败 swig -java命令不认
------------------------------------------------------------------------------------------

posted on 2006-07-18 07:56  3D入魔  阅读(1536)  评论(3编辑  收藏  举报