Recent Posts

Pages: 1 2 [3] 4 5 6 7 8 ... 10
21
Help / How do I stop Code::Blocks from opening on startup?
« Last post by Cookiehead on June 26, 2025, 04:05:18 pm »
I'm using Arch Linux, and Code::Blocks always opens on startup after I restart my computer. It's not that big of a deal (I can just close it) but just a minor inconvenience.
There are no programs in the startup section, so what keeps starting Code::Blocks?

Forums, wiki, and manual do not mention anything like this.. does anyone know?
Thanks.
22
General (but related to Code::Blocks) / Re: download for Linux
« Last post by stahta01 on June 25, 2025, 04:17:03 pm »
I notice that code::blocks doesn't have a choice for Ubuntu or many other except debian, I would love to see other popular linux distros here

So, create one and post a link in the nightly builds.
If you are talking about the last CB release in March 2025 contact your Linux distro to create a package.

Tim S.
23
Using Code::Blocks / Re: CB 25.02 - BrowseTracker crash on startup
« Last post by stahta01 on June 25, 2025, 04:04:31 pm »
Compilation on MSW now fails due to missing logmanager.h. The MSW project defines NOPCH, so sdk.h will not include logmanager.h. Also, double quotes should be used for the includes.

The solution is changing the first lines of JumpTracker.cpp to
Code
#include "sdk.h" // Code::Blocks SDK
#include "configurationpanel.h"
#include "cbstyledtextctrl.h"
#include "logmanager.h"
#include "projectmanager.h"
#include "editormanager.h"
#include "cbeditor.h"

No that is a workaround; not a solution.
Correction adding "#include "logmanager.h"" is a valid solution

Tim S.
24
General (but related to Code::Blocks) / download for Linux
« Last post by new_time_for_new_things on June 25, 2025, 03:35:22 pm »
I notice that code::blocks doesn't have a choice for Ubuntu or many other except debian, I would love to see other popular linux distros here
25
Using Code::Blocks / Re: CB 25.02 - BrowseTracker crash on startup
« Last post by Miguel Gimenez on June 25, 2025, 10:24:13 am »
Compilation on MSW now fails due to missing logmanager.h. The MSW project defines NOPCH, so sdk.h will not include logmanager.h. Also, double quotes should be used for the includes.

The solution is changing the first lines of JumpTracker.cpp to
Code
#include "sdk.h" // Code::Blocks SDK
#include "configurationpanel.h"
#include "cbstyledtextctrl.h"
#include "logmanager.h"
#include "projectmanager.h"
#include "editormanager.h"
#include "cbeditor.h"
26
Using Code::Blocks / Re: CB 25.02 - BrowseTracker crash on startup
« Last post by blauzahn on June 24, 2025, 07:59:02 pm »
Thank you Tim,

I always build without precompiled headers.

The actual error from gcc is:

Quote
trunk/src/plugins/contrib/BrowseTracker/JumpTracker.cpp:1313:9: error: 'LogSlot' was not declared in this scope
 1313 |         LogSlot& logslot = pLogMgr->Slot(logIndex);
      |         ^~~~~~~

I found its definition in logmanager.h.

Quote
Should my include statement use quotes instead of <> brackets?
Yes, you are right. Its a project header, not a system header. Is is not done consistently in cb and the plugins though.

Quote
Those variables were actually initialized, but the code got smushed without white space so that cppcheck didn't recognize it.
I re-formated it to cppcheck taste.
Maybe in this case. I did not look it up before posting. Nevertheless there are numerous bad examples still in cb-code. As for BrowseSelector: The two ctors leave parts uninitialized and do not delegate. The default ctor is marked private, implemented but the comment says it is unused. I prefer code that does not pose additional puzzles. If a tool has already spotted an issue and it is not a false positive. Then why should I fire up the debugger and search for spurious errors due to UB.

I actually like having CppCheck (trunk) in addition to gcc, clang, msvc, scan-build, clangd, clang-tidy and the sanitizers.
It is a very well maintained project with constant little improvements. You can get more control over it with:
Code
--inline-suppr --suppress=missingIncludeSystem

I have a largish project, north of 500k SLOC. In that I am usually down to a dozen cppcheck warnings. Granted, the code contains some cppcheck-suppress. Please note: It also contains some NOLINTNEXTLINE. I have enabled many warnings in compiler, cppcheck and clang-tidy. Some warnings might be debatable or not apply to some cases in a codebase. I prefer to not kill warnings globally but document exceptions on a per case base right at the spot in code. Needs judgement but that is a good thing. Recently, cppcheck changed the semantics of paths for #include. At the moment I get numerous missingInclude warnings. Did not yet investigate on that. Slightly annoying, hopefully just temporarily.

Thanks for adding the missing guard against nullptr. I would prefer code where this is not needed in the first place. With old code, you can not avoid it completely. But in newer code I'd at least try to minimize is.

If you are under Linux, I recommend to try scan-build( see https://clang.llvm.org/docs/analyzer/user-docs/CommandLineUsage.html#scan-build).
It reports several bugs in cb.
27
Using Code::Blocks / Re: CB 25.02 - BrowseTracker crash on startup
« Last post by stahta01 on June 24, 2025, 06:56:41 pm »
Hi Pecan,

thank you for the effort.

With the last patch (svn13671 BrowseTracker Move ... ) I get a compile error when building on Linux with make. An include is missing:
Code
#include <logmanager.h>
I don't understand this, logmanager.h is an sdk header, not a BrowseTracker header. It's included in trunk\src\include\Makefile.am Should my include statement use quotes instead of <> brackets?

I build without PCH and just got the same error with the git repo that is updated every 24 hours so it is likely 12 to 36 hours old at most.

So, test with out using PCH and you will likely get the issue.

Tim S.
28
Using Code::Blocks / Re: UI : how to close all sub program at once ?
« Last post by Miguel Gimenez on June 23, 2025, 04:40:53 pm »
Look at Edit -> Folding and Settings -> Editor -> Folding.

You can add shortcuts using Settings -> Editor -> Keyboard shortcuts
29
Using Code::Blocks / UI : how to close all sub program at once ?
« Last post by Mandrake8790 on June 23, 2025, 03:58:50 pm »
Hi,

I want to close at once all the sub programs.
Does it exist a shortcut or an item menu to do that ?

User case (see picture) :
i open several sub programs, so there are a lot of minus signs inside squares.
i want to close them all at once => the result : there are only plus signs

Thanks
30
General (but related to Code::Blocks) / Re: I just start learning C++
« Last post by stahta01 on June 23, 2025, 01:07:10 pm »
Website rules basically Code::Blocks questions are okay; but, programming how to is off topic (OT).

https://forums.codeblocks.org/index.php/topic,9996.0.html
Pages: 1 2 [3] 4 5 6 7 8 ... 10