diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 32b9a24d1d..a47178e611 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -87,12 +87,17 @@ /* Cygwin versions, wchar.h requires sys/types.h */ #ifdef __CYGWIN__ #include - extern "C" { + #ifdef __cplusplus + extern "C" { + #endif #endif /* Cygwin */ - #include - #ifdef __CYGWIN__ + + #include + + #if defined(__CYGWIN__) && defined(__cplusplus) } - #endif /* Cygwin */ + #endif /* Cygwin and C++ */ + #elif defined(HAVE_WCSTR_H) /* old compilers have relevant declarations here */ #include