I am trying to compile a c++ mapnik program with code in question being:
mapnik::grid my_grid(256, 256, "id");
and the command to compile being:
g++ grid_gen.cpp -std=c++11 -lmapnik -lcairo -lfreetype -lpng -licuuc -lz -ldl -Wall -o grid_gen
which ends up throwing this error:
grid_gen.cpp:(.text+0x744): undefined reference to `mapnik::hit_grid<mapnik::gray32s_t>::hit_grid(unsigned long, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' collect2: error: ld returned 1 exit status
I am on Ubuntu 16.04.2 with g++ 5.4.0.
How do I compile this without throwing any error?
If you are curious, I am trying to generate utf8 grid for the map tiles from c++.