Author Topic: Errors compiling watchesdlg.cpp (CodeBlocks17.12)  (Read 5929 times)

Offline Flowers

  • Single posting newcomer
  • *
  • Posts: 6
Errors compiling watchesdlg.cpp (CodeBlocks17.12)
« on: February 06, 2020, 10:11:14 pm »
I am setting up a new PC with Ubuntu 18.04, wxWidgets 3.1.3 (GTK3) and am trying to build CodeBlocks 17.12. Should I be using an older version of wxWidgets? The installation Wiki uses wxWidgets 2.8 with GTK2, but I run CodeBlocks17.12 on my old PC with wxWidgets 3.0.3 (GTK3) so it seems a backward step to use 2.8.
The problem I am having is compilation errors in watchesdlg.cpp, the first of which is “invalid use of incomplete type ‘class wxPGEditor’ class cbDummyEditor : public wxPGEditor”. Then wxPGWindowList doesn’t name a type, several functions marked ‘override’ do not override, wxPGTextCtrlAndButtonEditor is not declared, wxPGEditorDialogAdapter is incomplete etc.
WxPGEditor seems to be defined in wx/propgrid/editors.h, but I can’t see where editors.h is included. I wonder if someone could help me out please.

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: Errors compiling watchesdlg.cpp (CodeBlocks17.12)
« Reply #1 on: February 06, 2020, 11:00:40 pm »
Next time post the full error messages in code tags, this makes it easier to troubleshoot them.

Did you compile wxWidgets yourself? These messages indicate that wxWidgets is compiled with STL containers enabled (can't remember the exact wording of the feature), these are not enabled by default and CodeBlocks doesn't work with them enabled.

Offline Flowers

  • Single posting newcomer
  • *
  • Posts: 6
Re: Errors compiling watchesdlg.cpp (CodeBlocks17.12)
« Reply #2 on: February 07, 2020, 12:02:15 am »
Yes, I did compile wxWidgets myself using –enable-monolithic –withGTK=3 and –prefix= ... I didn’t specify –enable-std_containers or –enable-stl. Presumably I can check whether it got enabled some other way. I'll have another look tomorrow.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Errors compiling watchesdlg.cpp (CodeBlocks17.12)
« Reply #3 on: February 07, 2020, 12:40:38 am »
If using an CB project to build Code::Blocks, I believe it defaults to gtk2 instead of 3.
And, if yes, which project you are using?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Errors compiling watchesdlg.cpp (CodeBlocks17.12)
« Reply #4 on: February 07, 2020, 01:18:01 am »
@stahta01, sodev: Please don't feel obliged to post when you have no idea what the problem is. You're only causing confusion.

@Flowers: Most probably 17.12 doesn't work well with gtk3 or wxwidgets 3. Try the trunk code, but keep in mind that the gtk3 build is not tested much/at all, so you might stumble on many problems.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Errors compiling watchesdlg.cpp (CodeBlocks17.12)
« Reply #5 on: February 07, 2020, 02:09:50 am »
oBFusCATed

Most likely the problem is CB build is looking for wxWidgets 2.8 instead of 3.0 or higher!

But, I will let you "help" the OP!

Tim S.
« Last Edit: February 07, 2020, 02:16:44 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline sodev

  • Regular
  • ***
  • Posts: 497
Re: Errors compiling watchesdlg.cpp (CodeBlocks17.12)
« Reply #6 on: February 07, 2020, 04:10:36 am »
@oBFusCATed:
A long time ago i had compiling errors because of STL enabled wxWidgets versions that manifested in error messages about lists. But digging around in my memories i think the messages complained about missing methods and not missing types.

Taking a second look at the OP post i now realize the mentioned version of CodeBlocks and remember the dark days when CodeBlocks had so many problems with wx3.x (although i used mostly the windows version). I also remember the breaking changes of the wxPropgrid API and that wxWidgets keeps deprecated API only for one minor release increment.

TL;DR:
wx3.1 dropped wx2.8 API that CodeBlocks 17.12 still uses. You win, i lose.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Errors compiling watchesdlg.cpp (CodeBlocks17.12)
« Reply #7 on: February 07, 2020, 09:01:03 am »
@stahta01, sodev: Your posts continue to be just noise. The problem is related to the move from separate wxPropertyGrid to internal wxPropertyGrid and the changes in the API there.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline tigerbeard

  • Almost regular
  • **
  • Posts: 186
Re: Errors compiling watchesdlg.cpp (CodeBlocks17.12)
« Reply #8 on: February 07, 2020, 12:58:31 pm »
...seems a backward step to use 2.8.
Sorry I can not help with your issue, but I'd be interested what differences you see between C::B with GTK2 and GTK3.
Maybe anything that impacts usability (less line spacing in tree view) or dark themes (better readability), etc?

Offline Flowers

  • Single posting newcomer
  • *
  • Posts: 6
Re: Errors compiling watchesdlg.cpp (CodeBlocks17.12)
« Reply #9 on: February 07, 2020, 01:15:32 pm »
Thanks for your help. I have now downloaded the trunk code and got CodeBlocks running with a minimal project. I'll see how it goes and bear in mind that I may need to revert to GTK2 and / or an older wxWidgets. I'm afraid I won't be able to comment on differences between GTK2 and GTK3 since I have always been running GTK3.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Errors compiling watchesdlg.cpp (CodeBlocks17.12)
« Reply #10 on: February 07, 2020, 07:44:36 pm »
Please log any issue you see with GTK3. I plan to move to it for my local install, but I don't know when it would happen.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]