When compiling using clang and the libc++ C++ standard library, htmlcxx fails to compile because it can't #include <bits char_traits.h="">.
This happens because of this conditional in ci_string.h:
#if __GNUC__ >= 3 #include <bits/char_traits.h> struct ci_char_traits : public std::char_traits<char> #elif defined(__GNUC__) #include <std/straits.h> struct ci_char_traits : public std::string_char_traits<char> #else //Hope string already include it struct ci_char_traits : public std::char_traits<char> #endif
clang defines __GNUC__
for compatibility, however libc++ doesn't implement the same internal layout as GCC's libstdc++. The final case, relying on string to bring it in, works fine.
Note that bits/char_traits.h warns not to include it directly as it's an internal header:
/** @file char_traits.h * This is an internal header file, included by other library headers. * You should not attempt to use it directly. */
Thanks a lot for the fix. I have incorporated in the git head (just took a couple years...).