Author Topic: GCC Compiler setup problem: "Cannot exec `as': No such file or directory"  (Read 5581 times)

Offline AngleWyrm

  • Multiple posting newcomer
  • *
  • Posts: 15
Hi,
Just tried installing MingW and a Nightly (D:/Prog/Mingw, D:/Prog/CodeBlocks). I've deleted the old Release Candidate and I'm guessing some path info is missing/wrong.

When I try to compile a project, I get an error message from mingw32-g++ that reads:
"Cannot exec `as': No such file or directory."

What is this `as', and where do I go to point the right path?
« Last Edit: May 16, 2007, 02:11:16 am by AngleWyrm »

Offline AngleWyrm

  • Multiple posting newcomer
  • *
  • Posts: 15
Ok, figured it out; But I've left this post and answer in case anyone else has this problem.

as.exe is the MingW assembler program, and is included in the binutils distribution. I just had to download and extract that in my MingW directory, and now it works.

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
For future references...

Those who want to use MinGW on windows plattforms for C/C++ development, should download and unzip all the related packages into the same folder ("C:\mingw", for instance). The current stable commonly needed official packages are:

gcc-core-3.4.2-20040916-1.tar.gz
gcc-g++-3.4.2-20040916-1.tar.gz
mingw-runtime-3.9.tar.gz
mingw-utils-0.3.tar.gz
w32api-3.6.tar.gz
binutils-2.15.91-20040904-1.tar.gz
mingw32-make-3.80.0-3.tar.gz
gdb-6.3-2.exe (beware that gdb current version in MinGW site is 5.2.1-1)

And don't forget to add <MINGW>\bin to your PATH (replacing <MINGW> with the folder where you unzipped the files, e.g.: C:\mingw or simmilar). That's all.

Regards.

Edit: wrong links :)
Edit again: Changed link for gdb-6.3.2

« Last Edit: May 16, 2007, 04:30:59 pm by Deschamps »
Those who were seen dancing were thought to be insane by those who could not hear the music

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Note that for debugging in Code::Blocks you will need gdb-6.3-2.exe, rather than the version you posted (5.2.1-1).
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
Quote
(..) you will need gdb-6.3-2.exe, rather than the version you posted (..)

I'm not sure about that.

Those packages are the ones i've installed in my Windows XP computer, and I can debug without problems (certainly, i only do simple debug, watching content for variables and so).

Code
D:\>gdb --version
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU Gener
welcome to change it and/or distribute copies
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type
This GDB was configured as "i686-pc-mingw32".
Those who were seen dancing were thought to be insane by those who could not hear the music

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
See here, and here -- there are issues with breakpoints, among other things, when using GDB 5.x.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline Deschamps

  • Multiple posting newcomer
  • *
  • Posts: 120
Changed.
Thaks for the advice.
Those who were seen dancing were thought to be insane by those who could not hear the music