Open bmharper opened 7 years ago
We currently discussing this issue (and evaluation of VS2017) over here: https://github.com/mapnik/mapnik/issues/3573
As of today "FASTBUILD=0" "MAPNIKBRANCH=v3.0.x"
should compile with VS2015 Update3.
Thanks, but with that combination, I still get the following errors:
mapnik-v3.0.x\mapnik-gyp\mapnik-sdk\include\boost/spirit/home/support/attributes.hpp (1036): error C2672: 'swap': no matching overloaded function found (compiling source file ..\..\src\image_filter_grammar.cpp
and
packages\mapnik-v3.0.x\mapnik-gyp\mapnik-sdk\include\boost/spirit/home/support/attributes.hpp (1036): error C2784: 'void boost::spirit::swap(boost::spirit::multi_pass<T,Policies> &,boost::spirit::multi_pass<T,Policies> &)': could not deduce template argument for 'boost::spirit::multi_pass<T,Policies> &' from 'mapnik::color' (compiling source file ..\.. \src\image_filter_grammar.cpp
Ah sorry, master
is still missing the patch for boost@1.62
.
Make a copy of boost-1_61.diff naming it boost-1_62.diff
.
Then
clean.bat boost
packages\boost
scripts\build_boost.bat
scripts\build_mapnik.bat
That should work.
Thanks, that worked! I did need to manually apply the patch (ie "clean boost" && build_boost didn't cause it to be reapplied). Anyway - I think it would be very useful to have some kind of "last known good state", but I'm not sure where exactly you'd place that information.
Great!
I think it would be very useful to have some kind of "last known good state"
Yes, we've been thinking about how to achieve that a lot.
Normally master
should be in such a state.
So.. mapnik builds successfully, but when trying to build the C++ demo (rundemo.cpp), I get linker errors that I can't understand. Basically, it looks as though the linker is unable to find any symbols defined inside mapnik.lib, despite everything appearing to be correct. An example of a symbol that's not found is:
rundemo.obj : error LNK2001: unresolved external symbol "private: static enum mapnik::logger::severity_type mapnik::logger::severity_level_" (?severity_level_@logger@mapnik@@0W4severity_type@12@A)
I have done various things:
dumpbin /exports mapnik.lib
, to ensure that these symbols are exported from mapnik.lib (they are indeed exported)dumpbin /headers mapnik.lib
, to ensure that the lib file is an x64 lib file, consistent with the project settings of rundemo.cppgyp
to build rundemo.cpp - same result.As a test, adding or removing mapnik.lib from the list of linker input libraries makes no difference - I still end up with the same number of missing symbols (about 50 of them).
Has anybody seen this before? I'm wondering if it's a bug in the VC linker, because as far as I can tell, everything here lines up as it should.
UPDATE: It works! I needed to wipe all build outputs and start from a clean slate, and then those mysterious linker errors disappeared.
The following procedure worked for me:
copy patches\boost-1_61.diff patches\boost-1_62.diff
settings "FASTBUILD=0" "MAPNIKBRANCH=v3.0.x"
scripts\build
. I got an ICE (Internal Compiler Error) here on first build.scripts\build
again. On the second run, the build succeeded.bin\mapnik-win-sdk-v3.0.12-53-g7ce68e2-x64-14.0.7z
I'd just like to add for posterity, that a key thing I was missing previously was to #define _WINDOWS
. Without that, you get mysterious linker errors.
@bmharper Which file should #define _WINDOWS
add to?
@ojbgame It must be defined in all of your own C++ files that #include <mapnik.h>
.
@bmharper Thanks. It works.
Curious why an additional #define _WINDOWS
is needed.
It's defined here in mapnik-gyp
.
Going to investigate during the next weeks.
Hi, I've tried many variations today, trying to get this to build, but all of them fail, and all with different errors. I've tried several mapnik branches, including [master, v3.0.12, windows], and I've tried using FASTBUILD=0 and FASTBUILD=1, but all of those combinations end up with different errors - most of them compilation errors, but some of them linker errors. Is there a "known good" configuration that build on VS 2015 Update 3?