tclap depends upon config.h and the HAVE_CONFIG_H macro for proper behavior. The current implementation has a couple of problems:
* config.h isn't installed along with the rest of tclap, so unless the project using tclap defines HAVE_CONFIG_H and has a config.h which defines the appropriate macros tclap will not be fully functional.
* Arg.h and ValuesConstrant.h assume that if HAVE_CONFIG_H is defined then HAVE_SSTREAM or HAVE_STRSTREAM are also defined. In the case where a project defines HAVE_CONFIG_H but doesn't define either of the other two the compilation fails because no stream header is included.
To remedy this I've made the following changes:
* config/config.h is installed as tclap/config.h
* PACKAGE specific macros are removed from config.h to avoid clashing with those defined by other packages
* the HAVE_CONFIG_H guards (and any dependent stream logic) are removed and tclap/config.h is unconditionally included
patch
The code is also broken with <strstream>:</strstream>
https://sourceforge.net/p/tclap/code/ci/master/tree/include/tclap/Arg.h#l418
and
https://sourceforge.net/p/tclap/code/ci/master/tree/include/tclap/ZshCompletionOutput.h#l287
I will prepare a fix, but would strongly encourage dropping <strstream> support as it was deprecated in C++98 (20 years ago). Anyone relying on a pre C++98 compiler these days can be expected to do some extra work - I think.</strstream>
Fixed in https://sourceforge.net/p/tclap/code/ci/d2e552576050aedc6bb8d0a1004cb89f08c2fb03/
Thanks!