Code::Blocks Forums

User forums => Help => Topic started by: xhrit on September 07, 2006, 03:01:11 am

Title: errors compiling with wxgtk 2.7.1
Post by: xhrit on September 07, 2006, 03:01:11 am
Using Slackware Linux 10.2, here are the steps I take:

compile wxgtk 2.7.1 in 2.4 compatibility mode

download code::blocks from svn as described in wiki.

export ACLOCAL_FLAGS="-I /home/xhrit/Documents/Code/cpp/wxWidgets-2.7.0-1"

./bootstrap

./configure

./make

compiles fine for a wile, then pops errors in wxscintilla (duplicate case values) - fixed by commenting out 4 lines in ScintillaWX.cpp

./make

compiles fine for a while, then pops a slew ov errors I have no idea how to fix :

In file included from src/propgrid/odcombo.cpp:48:
../../../src/sdk/propgrid/include/wx/propgrid/odcombo.h:478: error: conflicting
   return type specified for `virtual int wxPGOwnerDrawnComboBox::GetCount()
   const'
/usr/local/include/wx-2.7/wx/ctrlsub.h:41: error:   overriding `virtual
   unsigned int wxItemContainerImmutable::GetCount() const'
src/propgrid/odcombo.cpp: In static member function `static wxObject*
   wxPGOwnerDrawnComboBox::wxCreateObject()':
src/propgrid/odcombo.cpp:2240: error: cannot allocate an object of type `
   wxPGOwnerDrawnComboBox'
src/propgrid/odcombo.cpp:2240: error:   because the following virtual functions
   are abstract:
/usr/local/include/wx-2.7/wx/ctrlsub.h:44: error:       virtual wxString
   wxItemContainerImmutable::GetString(unsigned int) const
/usr/local/include/wx-2.7/wx/ctrlsub.h:46: error:       virtual void
   wxItemContainerImmutable::SetString(unsigned int, const wxString&)
/usr/local/include/wx-2.7/wx/ctrlsub.h:121: error:      virtual void
   wxItemContainer::Delete(unsigned int)
/usr/local/include/wx-2.7/wx/ctrlsub.h:140: error:      virtual int
   wxItemContainer::DoInsert(const wxString&, unsigned int)
/usr/local/include/wx-2.7/wx/ctrlsub.h:142: error:      virtual void
   wxItemContainer::DoSetItemClientData(unsigned int, void*)
/usr/local/include/wx-2.7/wx/ctrlsub.h:143: error:      virtual void*
   wxItemContainer::DoGetItemClientData(unsigned int) const
/usr/local/include/wx-2.7/wx/ctrlsub.h:144: error:      virtual void
   wxItemContainer::DoSetItemClientObject(unsigned int, wxClientData*)
/usr/local/include/wx-2.7/wx/ctrlsub.h:145: error:      virtual wxClientData*
   wxItemContainer::DoGetItemClientObject(unsigned int) const


Title: Re: errors compiling with wxgtk 2.7.1
Post by: Ceniza on September 07, 2006, 04:20:36 am
wxWidgets 2.7.x has some changes that break Code::Blocks' compilation, and you can see that from the errors you got.

We are NOT supporting wxWidgets 2.7 yet, only 2.6, and it seems there's NOT any plans to support it by now.

If you want to compile Code::Blocks, please downgrade to wxWidgets 2.6.
Title: Re: errors compiling with wxgtk 2.7.1
Post by: xhrit on September 07, 2006, 04:30:59 am
hmm. So i take it i can compile codeblocks with 2.6, and then use it to build apps with 2.7?

I ask because the app I am building codeblocks to build uses 2.7.
Title: Re: errors compiling with wxgtk 2.7.1
Post by: Game_Ender on September 07, 2006, 07:15:32 am
Yes you can build Code::Blocks with 2.6 and then make an App that uses 2.7.  wxWidgets 2.7 is a developer release, and its moves too quickly and is to buggy for a project like Code::Blocks.
Title: Re: errors compiling with wxgtk 2.7.1
Post by: xhrit on September 08, 2006, 06:16:55 am
ok, so i removed wxwidgets 2.7 and installed 2.6 + patch as described in the wiki. (someone should really change the wiki - it said i could use 2.6 *or later*.) Anyway, everything compiles fine for a while... then it pops an error.

In file included from debuggerstate.cpp:2: debuggerstate.h:28: error: `cbProject' was not declared in this scope
Title: Re: errors compiling with wxgtk 2.7.1
Post by: killerbot on September 08, 2006, 08:14:35 am
ok, so i removed wxwidgets 2.7 and installed 2.6 + patch as described in the wiki. (someone should really change the wiki - it said i could use 2.6 *or later*.) Anyway, everything compiles fine for a while... then it pops an error.

In file included from debuggerstate.cpp:2: debuggerstate.h:28: error: `cbProject' was not declared in this scope

try again with rev 2959
Title: Re: errors compiling with wxgtk 2.7.1
Post by: xhrit on September 08, 2006, 12:16:31 pm
how do I get rev 2959?

I changed this :

#ifndef CB_PRECOMP
    #include "cbproject.h"
#endif

...to this :

#ifndef CB_PRECOMP
    #include "../sdk/cbproject.h"
#endif

...and then moved it in front the block ov #includes. Then i make again, and it compiled fine for a while. Then it gives me another error.

I ignore it, and just run su make install codeblocks. It works, sorta. On start it displays a notice that some plugins failed to load (every plugin after and including debugger.) And it wont allow a new project or file to be created, only a blank file. It does however compile and run a hello world program if i type one out in a blank file and save as .cpp - then i can press teh compile/run buttons.


Title: Re: errors compiling with wxgtk 2.7.1
Post by: killerbot on September 08, 2006, 01:48:45 pm
well since you got the souces from CB, I guess you are using svn --> svn update
Title: Re: errors compiling with wxgtk 2.7.1
Post by: xhrit on September 08, 2006, 11:08:14 pm
ok, so i did that, and compile again.

gdb_tipwindow.cpp: In member function `wxSize
   GDBTipWindowView::GetTextSize(wxArrayString&, const wxString&, int, int)':
gdb_tipwindow.cpp:365: error: `DBGLOG' undeclared (first use this function)

same error as before. so.. I ignore it again, and just run su make install codeblocks. It works, better then before, but not much. On start it still displays a notice that some plugins failed to load (but lists less plugins, only 3 this time) However, it still will not allow a new project or file to be created.
Title: Re: errors compiling with wxgtk 2.7.1
Post by: killerbot on September 09, 2006, 01:27:23 am
ok, so i did that, and compile again.

gdb_tipwindow.cpp: In member function `wxSize
   GDBTipWindowView::GetTextSize(wxArrayString&, const wxString&, int, int)':
gdb_tipwindow.cpp:365: error: `DBGLOG' undeclared (first use this function)

same error as before. so.. I ignore it again, and just run su make install codeblocks. It works, better then before, but not much. On start it still displays a notice that some plugins failed to load (but lists less plugins, only 3 this time) However, it still will not allow a new project or file to be created.


ok, we will fix the dependency tomorrow, for now you can safely comment out that line or you leave the line but then you need to #include "messagemanager.h" and #include "manager.h"

My suggestion : comment it out ;-)


[edit] : committed : rev 2964 (commented out the line)
Title: Re: errors compiling with wxgtk 2.7.1
Post by: xhrit on September 10, 2006, 03:14:42 pm
yeah, that worked.

thanks.