Author Topic: which standard to use, both for building wx and CB  (Read 58 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5561
Thoug I am not sure, I remember seeing passing by some discussion of stepping up to C++17 ?
Looking at the cbp file for wx32, I see it is at gnu++11 :-( .
I was already building for years wx itself with -std=c++11.

Now what did I just do today:
* build wx 332  (-std=c++11)
* build CB with that using the "CodeBlocks_wx33_64.workspace", which asked for a standard version, I went for -std=c++17 (so no gnu extensions), I already had put the wx global var wx33_64.

Outcome:
* built without a problem
* CB launches fine

WTF:
* on the second (or third launch), nearly all panels (management, logs & others, ..)and toolbars were gone. Reactivating them manually, all seems fine again.
Restarted CB a few times, all still ok it seems.

Question:
* already for a few months when I open the CB workspace, I always pops up a dialog to select the target (src is always preselected), so I just press ok. Is this a regression or a feature we introduced ?


Proposals for building the nighlies, this is controlled and we can do whatever we want: (in the hope it all builds and runs fine)
* build wx dll with -std=c++23, while doing the step-up to wx 3.3.2
* build CB with -std=c++23
* if 23 fails, try 20

Anyone aware of blocking bugs for using wx 3.3.2 ?

Proposal for evolution of the codebase
* switch to C++20, make this an internal firm requirement and allow us to use C++20 features, in the end we are like 6 years late ;-)
* no longer support older envrionments who can not adhere to this requirement
* ditch 32 bit, we have an official release from last year which is still 32 bit, I would say, this was the last one
* maybe even go to c++23 ? That would be my personal preference.

What do you think ?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1851
Re: which standard to use, both for building wx and CB
« Reply #1 on: Today at 01:04:46 pm »
Quote
Thoug I am not sure, I remember seeing passing by some discussion of stepping up to C++17 ?

Some code is generating warnings due to usage of C++17 features, p.e. [[falltrough]] usage in clangd_client. This change was intended to remove warnings but created others.

Quote
on the second (or third launch), nearly all panels (management, logs & others, ..)and toolbars were gone. Reactivating them manually, all seems fine again.
Restarted CB a few times, all still ok it seems.

wx3.3 changed the format used for saving the layout: if you open C::B compiled with wx3.3, close it (saving the layout explicitly or automatically) and then open C::B compiled with wx3.2 you will loose the layout.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5561
Re: which standard to use, both for building wx and CB
« Reply #2 on: Today at 02:13:16 pm »
Thanks, that's probably what I ran into.


I can understand we get more warnings when using more modern compilers and C++ standard.
In my professional live, I always go for 0 warnings.
But I think CB was never without warnings, so frmo that point of view I would tend to think this should not be a blocker, and we gradually can start fixing the warnings.
Or am I missing something ?