News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

wxscintilla & unicode

Started by grv575, August 22, 2005, 09:25:13 AM

Previous topic - Next topic

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.
Be patient!
This bug will be fixed soon...

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:


        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;
    }


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?)



mandrav

Yeah, I did that. I 'm not fully aware of the new unicode conventions for the project (I was away) so another dev will correct this hopefully.
In the meantime you can comment this block of code out so that compilation goes on. You 'll only notice something strange in the "Start here" page :P

Yiannis.
Be patient!
This bug will be fixed soon...

grv575

I did:

    buf << wxConvCurrent->cMB2WC(tmp);


Someone let me know if that's wrong (compiles ok).

Is the makefile working for the wxDockit compile:

Compiling resources...
mingw32-make: *** No rule to make target `..\wxDockit\lib\libwxdockit.a', needed
by `devel/codeblocks.exe'.  Stop.


tiwag

i also did a unicode build first, to see if everything works as expected,
and corrected it this way :

\src\src\startherepage.cpp:77
            buf << _U((const char*)tmp);

and updated in cvs last night nearly midnight UTC (to version 1.4.2.3)
so it should be available for all of you to update from cvs.

a diff can be found here:
http://cvs.sourceforge.net/viewcvs.py/codeblocks/codeblocks/src/src/startherepage.cpp?r1=1.4.2.2&r2=1.4.2.3

grv575

Perfect thx.  You have no idea how many casts I tried :)

grv575

It builds now.  Running it looks ok except maybe the resources are odd (compile, rebuild buttons):



tiwag

in my build even the buttons are displayed correctly,
there must be some (?) difference  :lol: between our builds.

grv575

nevermind.  it was a max path lengths problem.  don't run update.bat from the desktop...
I changed to c:\codeblocks and resources zip fine.

crashes on exit and hovering over debug toolbar (step into, step over, stop debug, etc).  maybe a tooltip bug.

tiwag

Quote from: grv575 on August 22, 2005, 04:34:06 PM
...
crashes on exit and hovering over debug toolbar...
yeah, there are still a few bugs left  8)

mandrav

Quote from: grv575 on August 22, 2005, 04:34:06 PM
nevermind.  it was a max path lengths problem.  don't run update.bat from the desktop...
I changed to c:\codeblocks and resources zip fine.

crashes on exit and hovering over debug toolbar (step into, step over, stop debug, etc).  maybe a tooltip bug.


This crash is a wx2.6 bug which is addressed by patching wxWidgets. Go to www.wxwidgets.org and download the patch for wxMSW-2.6.1...

Yiannis.
Be patient!
This bug will be fixed soon...

rickg22

I wish the wxwidgets guys would release wxMSW2.6.1-1 or something... having to patch the distros is awfully annoying.