mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-08-04 10:16:41 -04:00
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<T>::_name; This is now done and everything compiles fine. Since I'm not sure about the support for things like using MultiArg<T>::_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.
This commit is contained in:
parent
b34918c2fe
commit
b2c9942f51
@ -28,6 +28,8 @@
|
||||
#include <sstream>
|
||||
#include <tclap/Visitor.h>
|
||||
|
||||
#include <tclap/Arg.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace TCLAP {
|
||||
@ -40,6 +42,17 @@ namespace TCLAP {
|
||||
template<class T>
|
||||
class UnlabeledMultiArg : public MultiArg<T>
|
||||
{
|
||||
#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<T>::_ignoreable;
|
||||
using MultiArg<T>::_hasBlanks;
|
||||
using MultiArg<T>::_extractValue;
|
||||
using MultiArg<T>::_typeDesc;
|
||||
using MultiArg<T>::_name;
|
||||
using MultiArg<T>::_description;
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
|
@ -43,6 +43,19 @@ namespace TCLAP {
|
||||
template<class T>
|
||||
class UnlabeledValueArg : public ValueArg<T>
|
||||
{
|
||||
|
||||
#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<T>::_ignoreable;
|
||||
using ValueArg<T>::_hasBlanks;
|
||||
using ValueArg<T>::_extractValue;
|
||||
using ValueArg<T>::_typeDesc;
|
||||
using ValueArg<T>::_name;
|
||||
using ValueArg<T>::_description;
|
||||
using ValueArg<T>::_alreadySet;
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user