delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/26/05:32:02

Date: Wed, 26 Mar 1997 13:16:13 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Patrick Dawson <pkdawson AT geocities DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: GCC
In-Reply-To: <3337FA64.5138@geocities.com>
Message-ID: <Pine.SUN.3.91.970326131402.6618I-100000@is>
MIME-Version: 1.0

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 -


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