Date: Wed, 25 Jul 2001 14:32:51 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: ANW cc: djgpp AT delorie DOT com Subject: Re: Compile errors: getopt.h: no such file or dir (ENOENT), etc. In-Reply-To: <3B5EA695.376399DC@netscape.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk On Wed, 25 Jul 2001, ANW wrote: > > : ne2k-pci-diag.c:49: getopt.h: No such file or directory (ENOENT) > > : ne2k-pci-diag.c:56: sys/io.h: No such file or directory (ENOENT) > > : J:\junk> > > > > DJGPP doesn't have those header files. DJGPP do have getopt() so > > perhaps you can get away with #including unistd.h as per "info libc a > > getopt". > > In my installation of DJGPP, I DO have getopt.h and getopt.c residing in > a directory called > "g:\djgpp\gnu\filutil4.0\lib", and getopt.h also appears in the > directory called "g:\djgpp\rsxntdj\include". It seems to me that my > djgpp is not looking at those two directories. It doesn't look there, and it shouldn't: these directories are not part of the DJGPP development kit. filutil4.0 is the ported GNU Fileutils package; rsxntdj is the RSXNTDJ package. These, and others you might have on your system, are separate packages. The headers you see there belong to those packages, and to them alone. By contrast, the header files which you have in your g:\djgpp\include directory are part of the DJGPP standard C library. The compiler looks only there, unless instructed differently with the -I command-line switch. It would be wrong for the compiler to take header files from a package such as Fileutils, because those headers will certainly be wrong for anything _but_ Fileutils. Here ``wrong'' means that the prototypes and macros on those headers might conflict with code in other packages. In other words, the fact that you see a header file getopt.h does not yet mean that the contents of that file is what ne2k-pci-diag expects to find in that file. > But I also see that the file io.h appears in the following three > directories: > > g:\djgpp\include > g:\djgpp\rsxntdj\include > g:\djgpp\rsxntdj\include\emx > > Are these of no help to my compilation? I don't know. As the first approximation, I'd suggest to #ifdef away both the line which includes getopt.h and the one which includes sys/io.h, like this: #if 0 #include #endif and see if the program compiles.