artemp/trac2github — Issue #704: compiling without access to agg headers
Author: artemp
Created: 2011-10-09 20:47:44+00:00
State: open
Labels: Core_Library

post r2532 a few agg types are required in agg_renderer.hpp

So, I get (when compiling the node-mapnik js bindings):

{{{

[2/6] cxx: src/mapnik_map.cpp -> build/default/src/mapnik_map_1.o
In file included from /usr/local/include/mapnik/agg_renderer.hpp:35,
from ../src/mapnik_map.cpp:9:
/usr/local/include/mapnik/marker.hpp:30:46: error: mapnik/svg/svg_path_attributes.hpp: No such file or directory
/usr/local/include/mapnik/marker.hpp:31:38: error: mapnik/svg/svg_storage.hpp: No such file or directory
/usr/local/include/mapnik/marker.hpp:32:43: error: mapnik/svg/svg_path_adapter.hpp: No such file or directory
/usr/local/include/mapnik/marker.hpp:34:30: error: agg_path_storage.h: No such file or directory
In file included from ../src/mapnik_map.cpp:9:
/usr/local/include/mapnik/agg_renderer.hpp:38:30: error: agg_trans_affine.h: No such file or directory
In file included from /usr/local/include/mapnik/agg_renderer.hpp:35,
from ../src/mapnik_map.cpp:9:
/usr/local/include/mapnik/marker.hpp:47: error: ‘agg’ has not been declared
/usr/local/include/mapnik/marker.hpp:47: error: expected initializer before ‘<’ token
/usr/local/include/mapnik/marker.hpp:48: error: ‘mapnik::svg’ has not been declared
/usr/local/include/mapnik/marker.hpp:48: error: expected initializer before ‘<’ token
/usr/local/include/mapnik/marker.hpp:49: error: ‘svg_storage_type’ was not declared in this scope
/usr/local/include/mapnik/marker.hpp:49: error: template argument 1 is invalid
/usr/local/include/mapnik/marker.hpp:49: error: invalid type in declaration before ‘;’ token
/usr/local/include/mapnik/marker.hpp: In member function ‘unsigned int mapnik::marker::width() const’:
/usr/local/include/mapnik/marker.hpp:84: error: base operand of ‘->’ is not a pointer
/usr/local/include/mapnik/marker.hpp: In member function ‘unsigned int mapnik::marker::height() const’:
/usr/local/include/mapnik/marker.hpp:92: error: base operand of ‘->’ is not a pointer
In file included from ../src/mapnik_map.cpp:9:
/usr/local/include/mapnik/agg_renderer.hpp: At global scope:
/usr/local/include/mapnik/agg_renderer.hpp:60: error: expected ‘,’ or ‘...’ before ‘::’ token
In file included from ../src/mapnik_map.cpp:28:
/usr/local/include/mapnik/cairo_renderer.hpp:119: error: expected ‘,’ or ‘...’ before ‘::’ token
}}}

I think the proper solution would be to move render_marker perhaps, or simply forward declare the needed classes.