plugins\codecompletion\/parser/token.h: In function `bool LoadStringFromFile(wxFile*, wxString&)':
plugins\codecompletion\/parser/token.h:128: error: ambiguous overload for 'operator=' in 'str = buf'
C:/Development/wxWidgets/include/wx/string.h:627: note: candidates are: wxString& wxString::operator=(int) <near match>
C:/Development/wxWidgets/include/wx/string.h:847: note: wxString& wxString::operator=(wxChar) <near match>
C:/Development/wxWidgets/include/wx/string.h:861: note: wxString& wxString::operator=(const wxWCharBuffer&) <near match>
C:/Development/wxWidgets/include/wx/string.h:916: note: wxString& wxString::operator=(const wxString&) <near match>
I just report it here, because I don't have a solution for it...
the header is there :? so I don't know what is wrong... :cry:
--Edit--
I think I fixed it... at least it compiles again :lol: I post the diff so you can test it you're self, because I am NOT an unicode guru :lol:
Index: src/plugins/codecompletion/parser/token.h
===================================================================
RCS file: /cvsroot/codeblocks/codeblocks/src/plugins/codecompletion/parser/token.h,v
retrieving revision 1.4
diff -u -r1.4 token.h
--- src/plugins/codecompletion/parser/token.h 4 Oct 2005 09:17:22 -0000 1.4
+++ src/plugins/codecompletion/parser/token.h 6 Oct 2005 09:29:22 -0000
@@ -122,7 +122,7 @@
bool ok = true;
if (size > 0 && size <= 512)
{
- static char buf[513];
+ static wxChar buf[513];
ok = f->Read(buf, size) == size;
buf[size] = '\0';
str = _U(buf);
I don't think that would work... since wxChar would be now 16 bytes, the 0 would be inserted at an inappropriate location, leaving us with garbage strings. We need to find out exactly what went wrong, or how to convert a char buffer into a wxString.
Hmmm try this:
str = wxString(buf,wxConvUTF8);