Author Topic: code blocks installation error for version 20.03 bin with MinGW for Windows  (Read 3864 times)

Offline kdjones

  • Single posting newcomer
  • *
  • Posts: 1
  • C++ developer
I downloaded C::B today from Source Forge. After the install wizard finished, I created the "Hello World" sample code under console app and when I tried BUILD, I got the message: "It seems that this project has not been built yet. Do you want to build it now?" See screen print attachment. After replying YES I get the following errors:
-------------- Build: Debug in ChessZ (compiler: GNU GCC Compiler)---------------

gcc-ar.exe  -o bin\Debug\ChessZ.exe obj\Debug\main.o  -m32 
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ar.exe: unknown option -- 3
Usage: C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ar.exe [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
       C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ar.exe -M [<mri-script]
  d            - delete file(s) from the archive
  m[ab]        - move file(s) in the archive
  p            - print file(s) found in the archive
  q[f]         - quick append file(s) to the archive
  r[ab][f]  - replace existing or insert new file(s) into the archive
  s            - act as ranlib
  t            - display contents of archive
  •          - extract file(s) from the archive

 command specific modifiers:
  [a]          - put file(s) after [member-name]
            - put file(s) before [member-name] (same as )
  [D]          - use zero for timestamps and uids/gids
            - use actual timestamps and uids/gids (default)
  [N]          - use instance [count] of name
  [f]          - truncate inserted file names
  [P]          - use full path names when matching
  •           - preserve original dates
          - only replace files that are newer than current archive contents
 generic modifiers:
  [c]          - do not warn if the library had to be created
            - create an archive index (cf. ranlib)
            - do not build a symbol table
  [T]          - make a thin archive
  [v]          - be verbose
  [V]          - display the version number
  @<file>      - read options from <file>
  --target=BFDNAME - specify the target object format as BFDNAME
  --plugin <p> - load the specified plugin
 emulation options:
  No emulation specific options
C:/Program Files/CodeBlocks/MinGW/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ar.exe: supported targets: pe-x86-64 pei-x86-64 pe-bigobj-x86-64 elf64-x86-64 elf64-l1om elf64-k1om pe-i386 pei-i386 elf32-i386 elf32-iamcu elf64-little elf64-big elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
« Last Edit: December 27, 2021, 09:58:52 pm by kdjones »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7298
    • My Best Post
If you wish to build 32 bit GCC projects you need a 32 bit toolchain instead of an 64 bit toolchain!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
When in doubt, read the CB WiKi FAQ.

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1112
Also, gcc-ar.exe is the GNU archiver, not the linker. You should review the toolchain configuration.