From b2c9942f513be0910fcba5f28d47f5db9ee66e69 Mon Sep 17 00:00:00 2001 From: macbishop Date: Sat, 4 Sep 2004 21:09:37 +0000 Subject: [PATCH] Compilation was broken due to undef. symbols in compilers with 2 stage name-lookup (such as gcc >= 3.4). The fix for this is to tell the compiler what symbols to use withlines like: using MultiArg::_name; This is now done and everything compiles fine. Since I'm not sure about the support for things like using MultiArg::_name; on all compilers it is ifdef:ed away by default. To get 2 stage name-lookup to work you have to add -DTWO_STAGE_NAME_LOOKUP to your CXXFLAGS before running configure. --- include/tclap/UnlabeledMultiArg.h | 13 +++++++++++++ include/tclap/UnlabeledValueArg.h | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/include/tclap/UnlabeledMultiArg.h b/include/tclap/UnlabeledMultiArg.h index d3324c3..b6988f7 100644 --- a/include/tclap/UnlabeledMultiArg.h +++ b/include/tclap/UnlabeledMultiArg.h @@ -28,6 +28,8 @@ #include #include +#include + using namespace std; namespace TCLAP { @@ -40,6 +42,17 @@ namespace TCLAP { template class UnlabeledMultiArg : public MultiArg { +#ifdef TWO_STAGE_NAME_LOOKUP + //If compiler has two stage name lookup (as gcc >= 3.4 does) + //this is requried to prevent undef. symbols + using MultiArg::_ignoreable; + using MultiArg::_hasBlanks; + using MultiArg::_extractValue; + using MultiArg::_typeDesc; + using MultiArg::_name; + using MultiArg::_description; +#endif + public: /** diff --git a/include/tclap/UnlabeledValueArg.h b/include/tclap/UnlabeledValueArg.h index 8e9b613..0f74994 100644 --- a/include/tclap/UnlabeledValueArg.h +++ b/include/tclap/UnlabeledValueArg.h @@ -43,6 +43,19 @@ namespace TCLAP { template class UnlabeledValueArg : public ValueArg { + +#ifdef TWO_STAGE_NAME_LOOKUP + //If compiler has two stage name lookup (as gcc >= 3.4 does) + //this is requried to prevent undef. symbols + using ValueArg::_ignoreable; + using ValueArg::_hasBlanks; + using ValueArg::_extractValue; + using ValueArg::_typeDesc; + using ValueArg::_name; + using ValueArg::_description; + using ValueArg::_alreadySet; +#endif + public: /**