From 3caf99e4548daa70f24c5b31adefc572d0746e70 Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Mon, 13 Aug 2012 21:22:22 +0800 Subject: [PATCH] Fixed problem when compiling with GCC 4.7 --- src/wrapxerces.cpp | 1 - src/wrapxerces.h | 3 +++ src/xmlpromptgenerator.cpp | 5 +---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/wrapxerces.cpp b/src/wrapxerces.cpp index 4696df0..0f6e1da 100755 --- a/src/wrapxerces.cpp +++ b/src/wrapxerces.cpp @@ -18,7 +18,6 @@ */ #include "wrapxerces.h" -#define XERCES_TMPLSINC #include #include diff --git a/src/wrapxerces.h b/src/wrapxerces.h index e6eb8d1..e1f2bce 100755 --- a/src/wrapxerces.h +++ b/src/wrapxerces.h @@ -19,7 +19,10 @@ #ifndef WRAP_XERCES #define WRAP_XERCES + +#if __GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ < 7 ) #define XERCES_TMPLSINC +#endif #include #include diff --git a/src/xmlpromptgenerator.cpp b/src/xmlpromptgenerator.cpp index a2cb94f..e49b9be 100755 --- a/src/xmlpromptgenerator.cpp +++ b/src/xmlpromptgenerator.cpp @@ -30,9 +30,7 @@ #include "catalogresolver.h" // Xerces-C req'd for Schema parsing -#ifdef __WXMSW__ -#define XERCES_TMPLSINC -#endif +#include "wrapxerces.h" // Declaration of toString() and XERCES_TMPLSINC definition #include #include @@ -42,7 +40,6 @@ #include #include #include -#include "wrapxerces.h" // Delearation of toString() using namespace xercesc;