User forums > General (but related to Code::Blocks)
wxWidgets 2.9 patches to get Code::Blocks project to compile and run
stahta01:
FYI:
I have tested the patches against 2.9.2 wxWidgets and wxWidgets trunk SVN 68807.
I have not confirmed that the patches are correct.
Tim S.
--- Code: ---Index: src/sdk/cbauibook.cpp
===================================================================
--- src/sdk/cbauibook.cpp (revision 7398)
+++ src/sdk/cbauibook.cpp (working copy)
@@ -549,9 +549,13 @@
// If we open a project or a workspace, it can happen, that the tabCtrl is not yet rendered.
// in this case IsTabVisible always returns true and does not work correctly therefore.
// So we force a paint event here to render the tabCtrl
- // a little hacky, but it works
+ // a little hacky, but it works; not tested wx 2.9.2 change
+ #if wxCHECK_VERSION(2,9,2)
+ // No Idea if anything should be added here
+ #else
wxPaintEvent event;
tabCtrl->ProcessEvent(event);
+ #endif
int tabOffset = tabCtrl->GetTabOffset();
wxClientDC dc(win);
--- End code ---
--- Code: ---Index: src/plugins/codecompletion/parser/parserthread.cpp
===================================================================
--- src/plugins/codecompletion/parser/parserthread.cpp (revision 7398)
+++ src/plugins/codecompletion/parser/parserthread.cpp (working copy)
@@ -523,7 +523,7 @@
{
// token length of 1
case 1:
- switch (token[0])
+ switch ((wxChar)token[0])
{
case ParserConsts::semicolon_chr:
{
@@ -2681,7 +2681,7 @@
wxArrayString container;
for (size_t i = 0; i < args.Len(); ++i)
{
- switch (args.GetChar(i))
+ switch ((wxChar)args.GetChar(i))
{
case ParserConsts::space_chr:
container.Add(word);
--- End code ---
--- Code: ---Index: src/sdk/scripting/bindings/sc_wxtypes.cpp
===================================================================
--- src/sdk/scripting/bindings/sc_wxtypes.cpp (revision 7398)
+++ src/sdk/scripting/bindings/sc_wxtypes.cpp (working copy)
@@ -241,6 +241,8 @@
///////////////////
// wxArrayString //
///////////////////
+ typedef wxString&(wxArrayString::*WXAS_ITEM)(size_t);
+
SqPlus::SQClassDef<wxArrayString>("wxArrayString").
emptyCtor().
func(&wxArrayString::Add, "Add").
@@ -248,7 +250,11 @@
// func(&wxArrayString::Index, "Index").
staticFuncVarArgs(&wxArrayString_Index, "Index", "*").
func(&wxArrayString::GetCount, "GetCount").
+ #if wxCHECK_VERSION(2, 9, 2)
+ func<WXAS_ITEM>(&wxArrayString::Item, "Item");
+ #else
func(&wxArrayString::Item, "Item");
+ #endif
//////////////
// wxColour //
--- End code ---
heromyth:
cbauibook patches:
To replace
tabCtrl->ProcessEvent(event);
with
GetEventHandler()->ProcessEvent(event);
stahta01:
--- Quote from: heromyth on August 23, 2011, 03:22:02 am ---cbauibook patches:
To replace
tabCtrl->ProcessEvent(event);
with
GetEventHandler()->ProcessEvent(event);
--- End quote ---
It is NOT the correct fix; I tried it.
It causes a runtime warning that paint events are NOT allowed.
Tim S.
heromyth:
--- Quote from: stahta01 on August 23, 2011, 03:22:50 am ---
--- Quote from: heromyth on August 23, 2011, 03:22:02 am ---cbauibook patches:
To replace
tabCtrl->ProcessEvent(event);
with
GetEventHandler()->ProcessEvent(event);
--- End quote ---
It is NOT the correct fix; I tried it.
It causes a runtime warning that paint events are NOT allowed.
Tim S.
--- End quote ---
Which GCC version are you using? I'm using MingW GCC 4.5.2.
I compiled CB with this patch and the others you submitted.
However, the CB crashed when I create a new test CPP project. The new Dititalmars D project works.
heromyth:
--- Quote from: heromyth on August 23, 2011, 03:50:46 am ---
However, the CB crashed when I create a new test CPP project. The new Dititalmars D project works.
--- End quote ---
If codecompletion.dll is disabled, all the projects works (It seems that the patchs for codecompletion plugin not works). When CB quiting, an error raised (There are no more error messages).
Navigation
[0] Message Index
[#] Next page
Go to full version