I'm attempting to write a simple win32 x64 console application in c++ using VS 2017 that uses the Mapnik v3.0.9 SDK to render a png from a pgsql database.

All I've done so far is include a reference to the mapnik/map.hpp header file and attempting to build produces the following unresolved externals:

unresolved external symbol "private: static enum mapnik::logger::severity_type mapnik::logger::severity_level_" (?severity_level_@logger@mapnik@@0W4severity_type@12@A)

unresolved external symbol "private: static char const * * mapnik::enumeration::our_strings_" (?our_strings_@?$enumeration@W4well_known_srs_enum@mapnik@@$01@mapnik@@0PEAPEBDEA)

unresolved external symbol "private: static class std::basic_string,class std::allocator > mapnik::enumeration::our_name_" (?our_name_@?$enumeration@W4well_known_srs_enum@mapnik@@$01@mapnik@@0V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A)

unresolved external symbol "private: static char const * * mapnik::enumeration::our_strings_" (?our_strings_@?$enumeration@W4aspect_fix_mode@Map@mapnik@@$08@mapnik@@0PEAPEBDEA)

I've included the mapnik.lib and all boost lib files for the linker, I'm not sure how to proceed here. Any ideas on what I could be missing?

#include <mapnik/map.hpp>

int main()
    return 0;
  • So what does the code look like? – lynxlynxlynx Mar 18 '18 at 8:42
  • Added the code, nothing much really – user1435899 Mar 18 '18 at 8:45
  • It looks like you're missing additional mapnik includes — have you checked any docs? – lynxlynxlynx Mar 18 '18 at 10:35
  • There arent many docs for c++, I'm getting most of what I have from the examples. I did have a lot more includes previously, but those just generated more unresolved externals, so I took them out to focus on just getting this one working. – user1435899 Mar 18 '18 at 11:24
  • Add mapnik/symbolizer_enumerations.hpp and maybe mapnik/enumeration.hpp – lynxlynxlynx Mar 18 '18 at 11:30

Turns out that the prebuilt SDK at the moment does not support VC++ 2017.

After downloading and installing 2015, the exact same project builds fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.