delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/27/03:35:52

Date: Tue, 27 Apr 1999 10:33:39 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Artjacob <artjacob AT southcom DOT com DOT au>
cc: djgpp AT delorie DOT com
Subject: Re: Linking problems
In-Reply-To: <199904270250.MAA24363@hobart.southcom.com.au>
Message-ID: <Pine.SUN.3.91.990427103311.18849O-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 27 Apr 1999, Artjacob wrote:

>  "..    Error: C:\GCC\BIN/ld.exe: cannot open -lgcc: File Format not
> recognized .."
> 
>         Now.. "GCC" is the directory i have placed rhide.. All i can figure
> is that ld.exe is looking for a file named "-lgcc"

Actually, it looks for the file libgcc.a (which should be in your lib
subdirectory), and when that fails, it looks for -lgcc literally.  The
GCC compiler driver adds -lgcc (and -lc) to the switches it passes to
the linker; adding -v to the link command line would have showed this
to you.  (Looking in the FAQ, where section 8.1 explains this, would
have also helped.)

So, you need to find out why does the linker fail to find libgcc.a.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019