News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

code blocks installation error for version 20.03 bin with MinGW for Windows

Started by kdjones, December 27, 2021, 05:07:12 PM

Previous topic - Next topic

kdjones

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]
commands:
  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
  x
  •          - 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
      optional:
        --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))


stahta01

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Miguel Gimenez

Also, gcc-ar.exe is the GNU archiver, not the linker. You should review the toolchain configuration.