Hello,
i'm compiling C::B svn from source with wx2.9.3 unicode build on Linux Mint 12
I get this errors:
/trunk/src/include/logmanager.h|24|error: cannot convert ‘const wxStringCharType* {aka const char*}’ to ‘const wxChar* {aka const wchar_t*}’ in assignment|
for this code:
inline wxString F(const wxChar* msg, ...)
{
va_list arg_list;
va_start(arg_list, msg);
#if wxCHECK_VERSION(2,9,0) && wxUSE_UNICODE
// in wx >= 2.9 unicode-build (default) we need the %ls here, or the strings get
// cut after the first character
::temp_string = msg;
::temp_string.Replace(_T("%s"), _T("%ls"));
msg = ::temp_string.wx_str();
#endif
::temp_string = wxString::FormatV(msg, arg_list);
va_end(arg_list);
return ::temp_string;
};
from wx docs:
wxStringCharType is defined to be:
char when wxUSE_UNICODE==0
char when wxUSE_UNICODE_WCHAR==0 and wxUSE_UNICODE==1
wchar_t when wxUSE_UNICODE_WCHAR==1 and wxUSE_UNICODE==1
The wxUSE_UNICODE_WCHAR symbol is defined to 1 when building on Windows while it's defined to 0 when building on Unix, Linux or OS X. (Note that wxUSE_UNICODE_UTF8 symbol is defined as the opposite of wxUSE_UNICODE_WCHAR.)
and for wxChar:
wxChar is defined to be
char when wxUSE_UNICODE==0
wchar_t when wxUSE_UNICODE==1 (the default).
so the error looks obvious, if i compile wx under linux with wxUNICODE (what is standart wxVer > 2.9) wxChar is wchar_t and the internal representation for wxString is char. wx_str() returns char*.
Did i have to recompile wx with wxUSE_UNICODE_WCHAR=1 ?
Is this then UTF-16 ?
thx!