Monday, September 09, 2013

C++ build environment for mapnik project on Windows

C/C++ General
\mapnik\mapnik-v2.2.0\include;\mapnik\mapnik-v2.2.0\include\mapnik\agg;.;%(AdditionalIncludeDirectories)


C/C++ Preprocessor
LINUX;_WINDOWS;HAVE_JPEG;HAVE_PNG;HAVE_TIFF;MAPNIK_USE_PROJ4;BOOST_REGEX_HAS_ICU;MAPNIK_THREADSAFE;BIGINT;HAVE_LIBXML2;HAVE_CAIRO;%(PreprocessorDefinitions)


Linker General
Additional Library Directories \mapnik\mapnik-v2.2.0\lib

Linker Input
mapnik.lib;icuuc.lib;icuin.lib;cairo.lib;libboost_system-vc100-mt-1_49.lib


main include

#include "mapnik/layer.hpp"
#include "mapnik/rule.hpp"
#include "mapnik/line_symbolizer.hpp"
#include "mapnik/polygon_symbolizer.hpp"
#include "mapnik/text_symbolizer.hpp"
#include "mapnik/feature_type_style.hpp"
#include "mapnik/graphics.hpp"
#include "mapnik/datasource_cache.hpp"
#include "mapnik/font_engine_freetype.hpp"
#include "mapnik/agg_renderer.hpp"
#include "mapnik/expression.hpp"
#include "mapnik/color_factory.hpp"
#include "mapnik/image_util.hpp"

#if defined(HAVE_CAIRO)
#include "mapnik/cairo_renderer.hpp"
#include "mapnik/cairo_context.hpp"
#endif

#include <iostream>



Remarks:
Build with
C/C++ Code Generation>Basic Runtime Checks>Default
C/C++ Code Generation>Runtime Library>Multi-threaded DLL (/MD)
If you attempt to build with C/C++ Code Generation>Runtime Library>Multi-threaded Debug DLL (/MDd)
1>LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc100-mt-gd-1_49.lib'

1 comment:

Unknown said...

I really appreciate your work. Recently, I am interested in mapnik for windows using vs2010, but I don't know how to use the compiled windows 32 bit sdk. And after browsing this website, I got it. Thank you so much really.