Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Using Code::Blocks / MinGW Compiler: Building Native C and C++ Programs on Windows
« Last post by samalt on November 27, 2026, 04:01:48 pm »
For many Windows programmers, the first practical question is simple: how do I turn C or C++ source code into a real Windows program without buying a large commercial toolchain or learning a complicated build system first? The MinGW Compiler answers that question in a direct and useful way. MinGW is a minimalist GNU toolchain for Windows, built around the GNU Compiler Collection, and it compiles native Windows C and C++ programs with GCC. The result is an ordinary executable file that runs on Windows without an emulation layer, a compatibility runtime, or a separate Linux environment.

That native output is the idea that makes MinGW worth understanding. When GCC compiles a program through MinGW, the compiler produces machine code that calls Windows directly. A student can write a short console program, compile it, and run the resulting file on another Windows computer without installing a development environment there. A hobbyist can build a small utility and share it as a single file. A professional developer can use the same compiler flags and language standards that are familiar from Linux, while still producing software intended for Windows users. This combination of familiarity and native output explains why MinGW has remained popular for teaching, small tools, open-source projects, and cross-platform development.

Setting up the toolchain is also part of its appeal. A typical MinGW-w64 distribution arrives as a compressed archive rather than a large installer. You extract it to a short folder, add its bin folder to the system PATH, and test the installation with a simple version command. Once that step is complete, the commands gcc and g++ become available from a terminal. A first program can be as simple as a few lines that print a message, and the command to build it is short enough to remember. The debugger gdb and the build tool make are often included in the same package, so a beginner does not need to collect separate tools before writing useful code. If a program needs a library at run time, rebuilding with static linking options can often produce a more portable executable, although beginners should learn what each option does before using it in a larger project.

Choosing a distribution can still confuse newcomers, because several builds use similar names and different options for threading and exception handling. The safest approach is to choose a well-known current build, keep its folder separate from other toolchains, and use one consistent version while learning. In Code::Blocks, the compiler can then be selected in the compiler settings, and the IDE can find gcc, g++, and gdb in the folder already added to PATH. Testing a small project first makes configuration problems easier to find: if the compiler is missing, the error usually appears immediately, and if the program builds and runs, the rest of the setup is probably correct. For a clear and beginner-friendly overview, including installation guidance and common fixes, see MinGW Compiler.
2
General (but related to Code::Blocks) / Re: Welcome Newcomers - PLEASE READ!!!
« Last post by marblecat on November 27, 2026, 01:43:50 pm »
I am new, I am here !  8)
3
General (but related to Code::Blocks) / Re: Welcome Newcomers - PLEASE READ!!!
« Last post by zeyde on November 24, 2026, 08:54:50 pm »
Shalom! :) I am new, I am here! C::B 4life!
4
Using Code::Blocks / Re: cbp2make - makefile generation tool
« Last post by mirai on November 24, 2026, 11:50:10 am »
Three years later... built-in variables time again!

I've reviewed the code again and it looks like where I'm stuck with built-ins is applying the macro replacement, more precisely with understanding where those replacements may and may not occur.
In C::B sources everything is built around MacrosManager and it's doing a lot of different things inside for different purposes so it's hard to figure out what interactions with MacrosManager are related to built-in variables and probably user variables too.

Here's a quote from C::B wiki
Quote
Code::Blocks treats the following functionally identical character sequences
inside pre-build, post-build, or build steps as variables:

$VARIABLE
$(VARIABLE)
${VARIABLE}
%VARIABLE%

Variable names must consist of alphanumeric characters and are not case-sensitive.
Variables starting with a single hash sign (#) are interpreted as global compiler
variables. The names listed below are interpreted as builtin types.

Variables which are neither global user variables nor builtin types are replaced
with a value provided in the project file, or with an environment variable if the
latter should fail.

Per-target definitions have precedence over per-project definitions.

It's pretty clear how to process with pre-build and post-build steps as these are just user provided scripts.
However it is not clear to me what should I do about build steps.

The main question is where built-in and user variables may and may not appear?
I'm already setting up all variables I know how to define but I can't decide where exactly should I apply macro expansion.
Should it be every GNU Make macro value and every build instruction in every rule?
5
Using Code::Blocks / Re: cbp2make - makefile generation tool
« Last post by mirai on November 23, 2026, 02:51:44 pm »
There's a repo on Github where I publish newer revisions of cbp2make https://github.com/mirai-computing/cbp2make
Recently it's mostly bigfixes and small improvements, but you still may want to check it out.
6
Nightly builds / Re: The 07 October 2026 build (14050) is out.
« Last post by ThierryD on November 22, 2026, 03:25:47 pm »
Hi Miguel,

Sorry, AI don't resolve my problem ...     -)     Pass to Claude ...     -)
I try with "GDK_SCALE=1 GDK_DPI_SCALE=1 codeblocks &" without success.
I have last version of WSL on W11 26H2 64 bit (I use UniGetUI daily to update most of my installed programs).
And UI don't freeze after typing because I can type anything : UI don't respond on typing or click on mouse ... ALL freeze.

But thank about this suggestion.

Regards.
7
Nightly builds / Re: The 07 October 2026 build (14050) is out.
« Last post by Miguel Gimenez on November 20, 2026, 12:17:46 pm »
I do not plan to install WSL.

I have asked Gemini about the problem and it says it is a bug in WSLg, see the answer here.
8
This happened to me once this week and, at the same time, ligatures stopped working. After restarting C::B I have been unable to reproduce both issues.
9
Using Code::Blocks / Re: Code completion always selecting its own first suggestion
« Last post by cdavalillo on November 20, 2026, 01:38:22 am »
I've experienced the same, I thought that wqs my system but now I know it is Code::Blocks
10
Nightly builds / Re: The 07 October 2026 build (14050) is out.
« Last post by ThierryD on November 19, 2026, 06:00:49 pm »
Hi Miguel,

Thank for your reaction.
Yes, me too, if I use last nigthly CB on Linux Mint 22.3 (near Ubuntu 24.04) on "normal" way, and this problem don't appear.
On my "double boot" configuration (two hard disks dedicaced to each OS : Windows 11 26H2 64b and Linux Mint 22.3 64b), my only way to run Ubuntu 26.04 is into WSL.
I install last CB version from "Xaviou PPA" like usual.

I wait next version of Linux Mint (near Ubuntu 26.04) ... at the end of this year.

I launch last nigthly CB on  Ubuntu 26.04 into WSL, with option suggested "--safe-mode" and problem persist.

If I download  "christo's AppImage" of CB in same configuration, and run it (after "chmod +x"), problem is still present.

Really, I think that only way to resolve this is to test into WSL.
Have you possibility to access at computer with Windows 11 26H2 64b ?

Regards.

Thierry.


Pages: [1] 2 3 4 5 6 ... 10