Mapnik-Windows编译

该博客详细介绍了如何在Windows上编译和打包Mapnik 2.3.x。内容包括使用Visual Studio 2008或2010的步骤,以及构建Mapnik依赖的详细过程,如ICU、Boost、WebP等。此外,还提到了一些常见问题和解决方案。

Build and Package Mapnik for windows编译和打包

These are working notes on building Mapnik from source on windows.

  • Currently these instructions target the upcoming Mapnik 2.3.x release.
  • This is being tested on windows 7 64 bit.
  • This is currently only tested with release builds in 32 bit. 64 bit support is planned, but not tested yet.

Visual Studio versions.

These notes attempt to map out the steps to compile Mapnik and dependencies with either VS 2008 or VS 2010. We also plan to support VS 2012.

编译Mapnik和依赖是VS2008或VS2010。

Setup

Step 1: Build Mapnik dependencies

第1步:编译Mapnik依赖

See the building_mapnik_dependencies.md document for details on building Mapnik dependencies.

查看“编译_Mapnik_依赖.md”文档有更多关于编译Mapnik依赖的细节。

Step through it copying and pasting chunks of commands, ensuring they work before continuing.

逐步复制和粘贴命令块,确保它们在继续之前工作。

Step 2: Download and build Mapnik

Currently we are targeting Mapnik 2.3.x:

git clone https://github.com/mapnik/mapnik.git -b 2.3.x mapnik

Next edit the build_mapnik.bat and ensure the variables match your system (https://github.com/mapnik/mapnik-packaging/blob/18bb66ba95540c069acaf267ea7594bfd83734d9/windows/build_mapnik.bat#L3-L12). In particular ensure that the MAPNIK_SOURCE variable points the git checkout you just made above.

Then run the build_mapnik.bat:

cd mapnik-packaging/windows
build_mapnik.bat 1> build.log

Mapnik should be compiled and placed in the folder pointed to by the PREFIX variable in build_mapnik.bat

If you hit errors you can ask for help by creating an issue at https://github.com/mapnik/mapnik-packaging/issues?state=open

Gochas

The VS 2008 vcbuild command is broken on arrival

It complains about write-access. To fix it do:

cd C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcpackages
regsvr32 vcprojectengine.dll

https://github.com/mapnik/mapnik-packaging/tree/master/windows

 

编译依赖

Building Mapnik dependencies on Windows编译Mapnik依赖

(Visual C++ express 2008, 2010 and 2012 32-bit)

Buiding dependencies on windows can be very tedious. The goal here is to provide concise instructions for building individual packages using either VC++ 2008, or 2010/2012.

在windows上构建依赖关系可能非常乏味。这里的目标是提供使用VC++2008或2010/2012构建单个包的简明说明。

Hopefully, this will allow fully automated builds in the future.

希望这将允许将来完全自动化的构建。

Prerequisites前提准备

  • Visual C++ 2008, 2010 or 2012, Express or Professional versions
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值