Menu

#1048 At compilation, CodeBlock has an internal incompatibility of its own files or it does not find them.

Undefined
fixed
setup (2)
Bug_Report
2020-12-29
2020-12-27
dmanx
No

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.

1 Attachments

Discussion

  • Teodor Petrov

    Teodor Petrov - 2020-12-27

    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?

     
  • dmanx

    dmanx - 2020-12-27

    I need exactly the x32 compiler. The project support and can compiled only for only x86-32.

    "What happens if you use the installer without a compiler and then install a mingw64 (32bit or 64bit) separately?"

    I do not know. Have not tried it. And how to do it? In any case, it should be the same.

     
  • Teodor Petrov

    Teodor Petrov - 2020-12-28

    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.

     
  • dmanx

    dmanx - 2020-12-28

    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.

     
  • Teodor Petrov

    Teodor Petrov - 2020-12-28
     
  • Morten MacFly

    Morten MacFly - 2020-12-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     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++
    
    • status: open --> pending
     
  • Morten MacFly

    Morten MacFly - 2020-12-28

    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.

     
  • dmanx

    dmanx - 2020-12-28

    This looks to me as if you are trying to compile mixed 32/64 bit libraries. This won't work.

    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.

    For now, you could try to enforce a 32
    If you really need to compile 32 bits the recommendation still would be to use a 32-bit compiler.

    But the specified assembly is exactly 32-bit, containing a 32-bit compiler ?! Is not it?

    To help you, I would need the full compiler log, esp. the compiler and linker commands

    How do I get it?

     
  • Morten MacFly

    Morten MacFly - 2020-12-29

    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.

     
  • Morten MacFly

    Morten MacFly - 2020-12-29
    • labels: --> setup
    • status: pending --> fixed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.