From b392b8214eeb2bcedb8c49d966b673a4e485dba5 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Mon, 16 Apr 2018 11:10:54 +0200 Subject: [PATCH] add explicit instantiation declarations to DEFINE_ENUM macro to fix -Wundefined-var-template warnings. --- include/mapnik/enumeration.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/mapnik/enumeration.hpp b/include/mapnik/enumeration.hpp index 60a64016f..38a1b2065 100644 --- a/include/mapnik/enumeration.hpp +++ b/include/mapnik/enumeration.hpp @@ -281,7 +281,10 @@ operator<<(std::ostream & os, const mapnik::enumeration & e) using name = enumeration; #else #define DEFINE_ENUM( name, e) \ - using name = enumeration; + using name = enumeration; \ + template <> MAPNIK_DECL const char ** name ::our_strings_; \ + template <> MAPNIK_DECL std::string name ::our_name_; \ + template <> MAPNIK_DECL bool name ::our_verified_flag_; #endif /** Helper macro. Runs the verify_mapnik_enum() method during static initialization.