User forums > Using Code::Blocks

wxscintilla & unicode

(1/4) > >>

grv575:
I'm compiling VERSION_1_0 on windows using Makefile.wx2.6 (just appended u suffix to wx libs and msw dir).  It errors out when linking the new wxscintilla code.  Can't find an ansi (const char*) version of a wxStringBase method in the wx dll (since it is compiled to use unicode strings).  Not sure why this is happening, because wxscintilla seems to be able to handle unicode builds (going by the
#if wxUSE_UNICODE
#include "UniConversion.h"
in sdk/wxscintilla/src/PlatWX.cpp)

Screens:



Ideas?

mandrav:
I haven't built the unicode system here (wx/codeblocks) yet, so I can't help much for now...
Maybe one of the other devs can?

Yiannis.

Urxae:
Are you using the correct wx/setup.h (that is, one that #defines wxUSE_UNICODE to 1)?

grv575:
Wow, that's horrible.  Thanks for the tip Urxae.  Looks like wxWidgets defines wxUSE_UNICODE to 0 by default even when built as a unicode dll (citing windows9x compatibility).  Recompiling now, but so far so good.

grv575:
Another problem now.  Looks like a unicode conversion issue.  startherepage.cpp has:


--- Code: ---        wxString buf;
        ...
        wxInputStream* is = f->GetStream();
    char tmp[1024] = {};
    while (!is->Eof() && is->CanRead())
    {
    memset(tmp, 0, sizeof(tmp));
    is->Read(tmp, sizeof(tmp) - 1);
    buf << tmp;
    }

--- End code ---

The error below.  I don't know the proper way to convert the (char*) tmp buffer to wxString.  Any unicode conversion devs know?  (Or is the code really ok as is -- some other compilation problem?)


Navigation

[0] Message Index

[#] Next page

Go to full version