I read this thread twice; and, I see nowhere that the Code::Blocks version is stated.
What version of C::B is having this problem?
17.12, 20.03 or ?
I see posts like this all the time in where I'm a member of many forums - "what version". Never have I seen a problem solved relating to the current version. Given that patches are very minor tweaks & the issue stated here is obviously related to a global preference setting.
Usually I never see anything more constructive from the person requesting versions. They often chime in requesting every possible piece of info being requested about the programme, then nothing whatsoever to solve the problem.
Given that this was happening to my previous version before the update; which was considerably old (ver 17 something previously) it is most certainly not to do with a version. We're obviously talking about a global setting. I'm tempted to force rebuilding on the entire project, but obviously I shouldn't have to do this.
I updated to Ver 20.03 this morning.
The range of codeblocks versions in the wild is gigantic... There are reports form codeblocks version 9 years old, and there are also nightly builds, that fixed a lot bugs from 20.03 release, , versions with the same version number, but different versions of wxWidgets. versions with the same version number, same wxWidgets version number, but different GTK version, 64bit, 32bit ecc.... it is insane, so the question is really legitimate,
The build log does not look like you are making a rebuild (Build-> rebuild) The blue arrows in the toolbar, but only a build (the yellow, or yellow green button).
As i mentioned in the previous post codeblocks checks the dates from the file modification and uses this to decide if he should rebuild the exe.
Example:
1) You modify a.cpp
2) Codeblocks checks a.cpp modification date with a.obj modification date -> a.cpp is newer so rebuild a.obj
3) Codeblocks checks a.obj modification date with a.exe modification date -> a.obj is newer so rebuild a.exe
Now lets say you switch to b.cpp and disablea.cpp
4) Codeblocks checks b.cpp modification date with b.obj modification date -> b.cpp is newer so rebuild b.obj
5) Codeblocks checks b.obj modification date with a.exe modification date -> b.obj is newer so rebuild a.exe (note: here is a.exe used because you do not switch targets or project)
Now lets switch back to a.cpp without modifications, just a build
6) Codeblocks checks a.cpp modification date with a.obj modification date -> both the same, so no rebuild
7) Codeblocks checks a.obj modification date with a.exe modification date -> a.exe is newer so no rebuild -> start a.exe (the version you build with b.cpp)
Now if you hit the rebuild button (with the blue arrows) a.obj and a.exe will get deleted and everything should work...
(bare in mind, it can get quite complicated, and i may miss something here, so do not pinpoint me here....)