Mapnik 3 for Windows:why doesn‘t it work?

Mapnik 3的Windows二进制文件不再支持,需要手动创建VS解决方案。编译Mapnik 3.0遇到错误,但2.3分支可以成功。修复错误后,创建了一个可用的Python包,需要静态库构建和设置环境变量来处理DLL依赖。对于新手来说,编译Mapnik在Windows上具有挑战性。

编译好了Mapnik 3 C++之后,还需要Python Mapnik才能在Python中调用。。。

but....

https://github.com/mapnik/mapnik/issues/4062

Windows binaries are no longer suppported, as per mapnik/node-mapnik/issues/848 . I did make mapnik work after that by creating a VS solution by hand, it was however a pain (to put it mildly). This was of course more a one-time thing rather than a sustainable approach.

Edit: I have just noticed #4056 where there is a link to a CMake build which can be used with Visual Studio, but have not tried it yet.

Windows二进制文件不再提供,因为mapnik/node-mapnik/issues/848。我的确让mapnik工作了,经过创建一个VS工程。但是的确是一种痛苦的经历。这更像是一次,而非长久之计。

后续:我刚刚注意到#4056。这是一个CMake的编译链接,它可以在VS中使用,但是还没有尝试过。

yes, this fork

https://github.com/pedro-vicente/mapnik

has a CMake build for the 3.0 and 2.3 branches with the minimum dependencies

the 2.3 branch builds without errors and runs a test program with the OSM plugin
the 3.0 branch has some compiling errors, with Visual Studio 2019

I'll post those errors here later

                                                    ——————————pedro-vicente

here are the 3.0 errors

L:\mapnik\include\mapnik/feature.hpp(108,14): error C2664: 'mapnik::geometry::geometry::geometry(const mapnik::geometry::geometry &)': cannot convert argument 1 from 'mapnik::geometry::geometry_empty' to 'mapbox::util::no_init'

code

feature_impl(context_ptr const& ctx, mapnik::value_integer _id)
        : id_(_id),
        ctx_(ctx),
        data_(ctx_->mapping_.size()),
        geom_(geometry::geometry_empty()),
        raster_() {}

                                                    ——————————pedro-vicente

L:\mapnik\include\mapnik/geometry/reprojection_impl.hpp(17

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值