delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/01/08/15:23:59

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: 08 Jan 2004 16:25:59 +0200
Message-Id: <uvfnm4ivc.fsf@elta.co.il>
From: Eli Zaretskii <eliz AT elta DOT co DOT il>
To: djgpp AT delorie DOT com
In-reply-to: <btjn2b$1d9$1@home.itg.ti.com> (amheiser_bush@yahoo.com.au)
Subject: Re: Compile error: getopt.h
References: <btjn2b$1d9$1 AT home DOT itg DOT ti DOT com>
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: "James Calivar" <amheiser_bush AT yahoo DOT com DOT au>
> Newsgroups: comp.os.msdos.djgpp
> Date: Thu, 8 Jan 2004 08:47:55 -0500
> 
> main.c:33:20: getopt.h: No such file or directory (ENOENT)
> 
> According to the DJGPP site, getopt is provided in libc.a, but I don't see
> it anywhere in my installation and it's obviously not being found.  Anyone
> have any ideas?

`getopt' the _function_ is in libc.a, but the compiler complains
about the _header_file_ getopt.h, which is something different.
DJGPP doesn't have that header; the prototype declaration of the
function `getopt' is in unistd.h.

So simply remove line 33 of main.c or ifdef it away, and instead make
sure that main.c includes unistd.h.

- Raw text -


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