delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/11/19/12:14:58

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Wed, 19 Nov 2003 18:44:02 +0200
From: "Eli Zaretskii" <eliz AT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-Id: <8632-Wed19Nov2003184401+0200-eliz@elta.co.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9
In-reply-to: <3fbb8c90$0$11887$9b4e6d93@newsread2.arcor-online.net>
(wolfgang DOT schlegel AT arcor DOT de)
Subject: Re: GCC Lib Search Path
References: <3fbb8c90$0$11887$9b4e6d93 AT newsread2 DOT arcor-online DOT net>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Wolfgang Schlegel" <wolfgang DOT schlegel AT arcor DOT de>
> Newsgroups: comp.os.msdos.djgpp
> Date: Wed, 19 Nov 2003 16:31:00 +0100
> 
> a problem I can't solve deals with gcc's lib search path. I try the command
> line
> 
>      gcc test.cpp -o test.exe libm.a
> 
> and get
> 
>     gcc.exe: libm.a: No such file or directory (ENOENT)

You need to say "-lm" instead of "libm.a" (without the quotes).  The
library search algorithm only applies to the first form; if you say
"libm.a", GCC understands that as a file libm.a in the current
directory.

I believe the FAQ explains that in section 8.22.

- Raw text -


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