When compiling a project, CodeBlock issues the following messages.
BuildLog:
.../CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible .../CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/libstdc++.a when searching for -lstdc++
.../CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lstdc++
.../CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible .../CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
.../CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmingw32
.../CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible .../CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/libgcc_s.a when searching for -lgcc_s
.../CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgcc_s
...
BuildMessage:
ld.exe|cannot find -lstdc++|
ld.exe||cannot find -lmingw32|
ld.exe||cannot find -lgcc_s|
...
etc. for 20 files.
In the beginning, there was CodeBlock 16. Everything worked without problems in it. Then, I removed it and installed CodeBlock 20:
codeblocks-20.03mingw-32bit-setup.exe
All settings are automatic by default. I haven't changed them. I got these messages while compiling.
Then, I took another file that does not require installation with all internal settings:
codeblocks-20.03mingw-32bit-nosetup.zip
But with him everything is the same.
OS Windows 10x64.
People had similar compilation errors:
https://stackoverflow.com/questions/62461483/codeblocks-compile-program-for-32bit-computer
But I didn't understand how they were solved.
Do you have a particular requirement to install the 32 bit version? What happens if you install the 64 bit version?
What happens if you use the installer without a compiler and then install a mingw64 (32bit or 64bit) separately?
I need exactly the x32 compiler. The project support and can compiled only for only x86-32.
I do not know. Have not tried it. And how to do it? In any case, it should be the same.
64bit codeblocks can use 32bit compilers. It has problems debugging such projects, but this is another issue.
You could also install another 32bit compiler and see if it works.
It is also fundamentally important for me, that the debugger and disassembler work.
What's wrong with CodeBlock? Maybe, some settings are incorrect?
After all, it was tested before publication. It cannot be, that a non-working version has been published.
@killerbot
Diff:
This looks to me as if you are trying to compile mixed 32/64 bit libraries. This won't work. To help you, I would need the full compiler log, esp. the compiler and linker commands. C::B 32-bit works just fine, I am using it on a daily basis.
First hint: For now, you could try to enforce a 32- or 64-bit build (depending on what you have in mind) by using the -m32 or -m64 compiler and linker switch.
Second hint: This type of error would happen, if you are enforcing a 32-bit build (-m32) using a 64-bit compiler (and therefore 64-bit system libs) and linking against other 32-bit libs. If you really need to compile 32 bits the recommendation still would be to use a 32-bit compiler.
How can this happen? I haven't changed any of the initial settings in C::B.
It is for this reason (so that all the original settings are preserved) that I took the option that does not require installation.
codeblocks-20.03mingw-32bit-nosetup.zip
And if some settings are incorrect, then they were originally.
But the specified assembly is exactly 32-bit, containing a 32-bit compiler ?! Is not it?
How do I get it?
We do ship the same (64-bit) compiler with both versions: 32-bit and 64-bit C::B. This works just fine, as you can compile both: 32-bit and 64-bit target applications.
But: What you have in mind to do most likely requires a pure 32-bit compiler / libs.
So, my recommendation is: Either you install a 32-bit compiler yourself or you wait until I upload a new bundle, replacing the 64-bit with the 32-bit version of the compiler.
Maybe we should have done this in the first place, as debugging should likely fail in your combination, too. The major drawback of that new setup is, that you won't be able to compiler 64-bit applications anymore, but most of today's OSes are 64 bit since a long time. Thats why we actually wanted to drop 32 bit altogether.
As promised, I've provided a distribution with 32 bit compiler here:
https://sourceforge.net/projects/codeblocks/files/Binaries/20.03/Windows/32bit/codeblocks-20.03-32bit-mingw-32bit-nosetup.zip/download
I assume this issue is fixed, therefore.