No, it should not.
The header file uses that #if LOG4CXX_HAS_WCHAR_T since the function UnicodeHelper::decodeWide must be present in all wchar_t enabled builds. However, there are several implementations of decodeWide depending on the nature of wchar_t. If the nature of wchar_t can't be determined, the build will fail due to a link failure.
The particular implementation of decodeWide at line 95 in unicodehelper.cpp is only valid if wchar_t contains UTF-16 values. The only platform currently supported where wchar_t is UTF-16 is Windows. If another platforms are indentified where wchar_t is UTF-16, then the #if defined(_WIN32) can be modified (likely introducing a LOG4CXX_WCHAR_T_IS_UTF16 macro within unicodehelper.cpp).
What was the compile problem that you were having, what compiler were you using, etc.