OS: Windows 7 - 32-bit
installer: codeblocks-20.03mingw-32bit-setup.exe
After installation, C::B autodetects the compiler fine, but then displays the window that it cannot find the compiler -- it just found and set gcc as the default??
C::B will not build or rebuild any project and no compiler output is shown in the IDE window. Investigating further, I open the command-prompt and check the version on gcc and receve the following ERROR:
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\david>gcc --version This version of c:\Program Files\CodeBlocks\MinGW\bin\gcc.exe is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need a x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.
This is not the same as: http://forums.codeblocks.org/index.php/topic=23746.0.html
Thinking I may have accidentally installed with: codeblocks-20.03mingw-setup.exe I uninstalled C::B again and reinstalled with codeblocks-20.03mingw-32bit-setup.exe. Same problem. The files distributed will not run on 32-bit Windows 7. I had no problem with C::B 16 (which is what I was replacing)
If any further information is needed, please let me know.
Oops, forgot to include line breaks in the error to make it easier to read:
Last edit: david rankin 2020-05-28
Is there a solution yet, or is my only option to downgrade Codeblocks to 16 or Codeblocks 17 for Windows 7 32-bit? We are pushing a month and this is somewhat of a showstopper bug for everyone with a 32-bit computer.
Code::Blocks is not a compiler. You can use the old compiler with the new version of C::B or vice versa.
The problem is with c:\Program Files\CodeBlocks\MinGW\bin\gcc.exe installed by the Code::Blocks installer codeblocks-20.03mingw-32bit-setup.exe. I didn't install some separate compler, Code::Blocks installed it for me.
I installed the full Code::Blocks with gcc MinGW and the build of the MinGW gcc package that Code::Blocks packages for install in 32-bit windows is NOT compatible with 32-bit windows (I'm sure it works fine with 64-bit windows).
That is the whole issue. Not Code::Blocks itself, but the MinGW compiler Code::Blocks includes in its codeblocks-20.03mingw-32bit-setup.exe installer package. That compiler from this new release of Code::Blocks 20.03 with its include gcc MinGW is the one that will not even run on 32-bit Win7 installs.
When you say I can use the old compiler -- No, that compiler is uninstalled by Code::Blocks when Code::Blocks is removed to install codeblocks-20.03mingw-32bit-setup.exe. I am removing Code::Blocks 20 and reinstalling Code::Blocks 17 and we will report if that compiler works fine on 32bit Win7 as Code::Blocks 16 did before.
Last edit: david rankin 2020-06-30
For example, I just uninstalled codeblocks-20.03mingw-32bit-setup.exe which installed the incompatible version of MinGW gcc and immediately installed codeblocks-17.12mingw-setup.exe and then opened Code::Blocks, selected a project and chose "Build" and all went fine. I then opened the Command.exe to check the gcc version and:
No problems at all. So whatever version of MinGW is contained in codeblocks-20.03mingw-32bit-setup.exe it is NOT compatible with a 32-bit version of Windows 7.
The problem is that codeblocks-20.03mingw-32bit-setup.exe is bundled with 64-bit MinGW.
Until it's resolved you can install 32-bit MinGW separately from https://sourceforge.net/projects/mingw-w64/files/
Thank you! I'll re-install codeblocks-20.03 without mingw included and download and install the the 32-bit MinGW files from the sourceforge link.. After using codeblocks 16 and 17 without any problems, the 20.03mingw-32bit installer really left me scratching my head on why it would not run on 32bit Windows. I didn't know if all, or just part of the included MinGW was 64-bit, but I new at least the gcc executable was not compatible with win32 and likely the 64-bit version.
This problem has been around since the 20.03 version came out in April, 2020. I'm afraid it's going to take a while for them to upload another version. So, what I recommend is for you to reinstall the older version you used to work with (if you deleted it like I did). Hopefully, you will have Code::Blocks working as well as it used to soon. Here's a link to the oldest versions: www.codeblocks.org/downloads/5. Good luck!
Last edit: César Pineda 2020-07-28
Thank you César,
I went back and installed codeblocks-20.03-32bit-setup.exe without the included 64-bit MinGW and installed a 32-bit MinGW with gcc 6.3. That is working fine. When there is a new complete Code::Blocks pakcage with a 32-bit MinGW, (20.04?) I'm ready to test it. Thank you for your help.
There are updated packages on sourceforge that were uploaded on 29-Dec-2020. They have some issues in that the bin files look correct, but the files include some x64 files in the root when they should have the x86 files. I do not have a Win10 32bit virtual box image to test it on.
If you get time you could try the zip file and let post here if it works for you.
I've tested Code Blocks Windows 32 bit (including 32 bit compiler)(file codeblocks-20.03-32bit-mingw-32bit-setup.exe) on 32-bit VM and it works, but CodeBlocks cannot detect MinGW because it expects files mingw32-gcc.exe and mingw32-g++.exe to be present. There are no such files, but there are gcc.exe, g++.exe, i686-w64-mingw32-c++.exe, i686-w64-mingw32-g++.exe.
Manually point folder to MinGW installation in CodeBlocks subfolder and rename compiler files in Compiler settings/Global compiler settings/Toolchain executables to existing files. Then it works fine.
This was fixed in a silent re-release of the 32 bit version.
Awesome. Thank you!