Mail Archives: djgpp/1997/09/14/14:53:05
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 -