www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/14/14:53:05

Date: Sun, 14 Sep 1997 11:42:10 -0700 (PDT)
Message-Id: <199709141842.LAA12516@adit.ap.net>
Mime-Version: 1.0
To: Jeff Wilson <DW26524 AT swt DOT edu>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: I keep getting a file format error in linking

At 11:42  9/13/1997 -0500, Jeff Wilson wrote:
>I am new to gcc, but am liking it very much. If I make az simple one
> file program, all is fine, but when I link several files together...I
> get a
> 
> ld.exe error -lgcc file in wrong format
> 
> After browsing the mail archive, I found other with this problem, so I
> don't feel alone. The answer you gave was to check the libgcc.a file
>for
> corruption. I followed your suggestions, but to no avail. Still same
> problem.
> Please respond ASAP, because there is only 3 days left before this
> assignment is due. (I didn't wait until the last minute...it was
> assigned two days ago.)
Hmm, I'm not sure what to say. Try the following:
- Put the stock libgcc.a in the /djgpp/lib directory;
- Put the stock ld.exe in the /djgpp/bin directory;
- Make sure there aren't any other ld.exe's or libgcc.a's hanging around;
- Do your linking like this:
gcc -v -Xlinker --verbose foo.o bar.o baz.o
See if its output is helpful. If not redirect it to a file and post here.

Hope this helps

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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