Mail Archives: djgpp/1997/03/26/05:32:02
On Tue, 25 Mar 1997, Patrick Dawson wrote:
> I'm having trouble compiling a file with GCC. I used
> 'gcc simple.c -o simple.exe -lm'.
> I got the error message 'ld.exe:cannot open -lm:File is in wrong
> format'.
> I tried it without the -lm but got a similar message. Can anyone help?
You mean it complained about -lm even when you DON'T mention -lm on the
command line? Are you sure?
Anyway, please invoke gcc like so:
redir -o gcc.log -eo gcc simple.c -o simple.exe -lm
then post the contents of the file gcc.log created by this command.
- Raw text -