Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: ollydbg on February 25, 2026, 02:39:15 am

Title: svn rev 13798 issue?
Post by: ollydbg on February 25, 2026, 02:39:15 am
Hi, Pecan, I see this commit:

https://sourceforge.net/p/codeblocks/code/13798/

Some of changes in the cbp files are not expected? I think the macro variable "CODEBLOCKS" is not needed here.
Title: Re: svn rev 13798 issue?
Post by: Pecan on February 25, 2026, 05:01:35 pm
Do you mean that it's causing an error. Where do you get the error?

What OS? What compiler? Which wxWidgets?

I can't reproduce an error. Can you give me some steps to cause the error?
Thanks
Title: Re: svn rev 13798 issue?
Post by: ollydbg on February 26, 2026, 01:46:50 am
You must have the compiler global variable CODEBLOCKS defined.

But that was not necessary.  For example, if you look at this cbp file and other cbp files.

https://github.com/arnholm/codeblocks_sfmirror/blob/master/src/plugins/contrib/SmartIndent/SmartIndent_wx32_64.cbp

You don't see any CODEBLOCKS variable needed.

I'm not sure you can understand my explanations.  But this compiler macro is not needed in cbp file and the update file.
Title: Re: svn rev 13798 issue?
Post by: Pecan on February 26, 2026, 06:33:53 am
$(CODEBLOCKS) is automatically defined by CB in macrosmanger. The user does not need to define it anywhere.

Are you getting errors when compiling codesnippets ?

The use of $(CODEBLOCKS) makes it easy to drag a contrib dir out of the local repo to a new separate directory and work with the contrib without .cbp changes. Then drag it back to the repo without making mistakes trying to fix the .cbp file. No changes, no mistakes.

Without using the macro, you cannot use the repo .cbp without making ../../.. changes all over the place, It  is much easier to use $(CODEBLOCKS)\..\ without making any changes to the .cbp(s) and the macro is build into the sdk source code builtin variables.
https://wiki.codeblocks.org/index.php/Variable_expansion