Skip to content
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.

Build with VS2017 #118

Closed
NobilisNC opened this issue Apr 10, 2018 · 1 comment
Closed

Build with VS2017 #118

NobilisNC opened this issue Apr 10, 2018 · 1 comment

Comments

@NobilisNC
Copy link

NobilisNC commented Apr 10, 2018

Hello,

I have compiled mapnik with VS2015, but my project use a lot of c++17 features, and when I want to use mapnik inside, The program crashed because of different CRT (bug is appearing when I have to std::move something from my program to a Mapnik function).

Exemple

 feature_type_style raster_style;
    {
      rule r;
      {
        raster_symbolizer raster_sym;

        r.append(raster_sym);
      }
      raster_style.add_rule(std::move(r)); // <-- Here it crashes
    }
    m.insert_style("raster_style", raster_style); // Or here, if I comment the above live

So, I decided to compile Mapnik with VS2017 and I succeed to compile mapnik.dll thanks to VS project (.sln) created in packages\mapnik-v3.0.x\mapnik-gyp\build
The problem I have now is everything works with mapnik but I need to compile all his dependecies to VS2017. But I did not fully understand how they are building. Is there a .sln somewhere ? With CMake ?

Thanks :)

@wilhelmberg
Copy link
Contributor

@NobilisNC sorry to let you know, but this repository is not maintained anymore and we do not provide any further support.

You can read up on why here: mapnik/node-mapnik#848


I decided to compile Mapnik with VS2017 and I succeed to compile

While the build might have succeeded I suppose the resulting mapnik.dll was still built with VS2015 build tools nevertheless, as everything else is disabled (no VS2017 support):
https://github.com/mapbox/windows-builds/blob/master/settings.bat#L82

Dependencies could be built by passing the "FASTBUILD=0" flag to settings.bat:
https://github.com/mapbox/windows-builds#creating-binary-mapnik-dependencies-packages-mapbox-specific

However you would also have to update these dependency build scripts (https://github.com/mapbox/windows-builds/tree/master/scripts) to work with VS2017.

https://github.com/mapnik/mapnik-gyp would also have to be updated to VS2017 as this is the repository that does the actual build.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants