From f84c2ea5e2d1c2269be7002d17490cbefded6d7f Mon Sep 17 00:00:00 2001 From: Jochen Topf Date: Mon, 26 Aug 2013 10:30:39 +0200 Subject: [PATCH] Use #define instead of const char* for version. You can't initialize strings in header files, because they might be included from several source files and the linker will see several copies of the same string. --- include/osmpbf/osmpbf.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/osmpbf/osmpbf.h b/include/osmpbf/osmpbf.h index e354907..9dd8de1 100644 --- a/include/osmpbf/osmpbf.h +++ b/include/osmpbf/osmpbf.h @@ -7,10 +7,9 @@ // this describes the high-level OSM objects #include -namespace OSMPBF { +#define OSMPBF_VERSION "1.3.0" - // library version - const char *version = "1.3.0"; +namespace OSMPBF { // the maximum size of a blob header in bytes const int max_blob_header_size = 64 * 1024; // 64 kB