From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: .h files unrecognised Date: Sat, 14 Feb 1998 12:52:19 -0500 Organization: Two pounds of chaos and a pinch of salt. Lines: 43 Message-ID: <34E5D9D3.5C94@cs.com> References: <34E59182 DOT 80F AT which DOT net> NNTP-Posting-Host: ppp209.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Andrew wrote: > > I have tried to install djgpp on my pc but when I run a small test > program it fails to detect the stdio.h file even though all the .h > files are in the same directory as the program. If I enclose the > stdio.h in quotes and not angle brackets ie. "stdio.h" not , > then the program can find the stdio.h file but it cannot find any of > the files that stdio.h calls. Any help would be greatfully appeciated. That's not how any compiler works, much less DJGPP. Each type of file (headers, libraries, binaries) has its own separate directory in the DJGPP installation tree. If you preserve the directory structure when you unzip the DJGPP zipfiles, these directories should be created automatically. After that, all you have to do is set the two environment variables that DJGPP requires and you're ready to go. Under no circumstances should you write your program in the same directory as the system headers, nor should you copy the system headers into your program's directory. I assume you didn't read the file named 'v2/readme.1st' that explains exactly how to install and use DJGPP, or that you didn't understand what you read. Please try again and tell us if that helps. > The program I have been trying is: > > #include > void main (void) > { printf ("Hello"); } main() must return an integer according to the ANSI C standard. Declaring it as void, or omitting a 'return' statement can cause subtle and hard to debug problems, particularly when using RHIDE. Reference: comp.lang.c FAQ (http://www.eskimo.com/~scs/C-faq/top.html), questions 11.12 through 11.15. -- --------------------------------------------------------------------- | John M. Aldrich | "A generation which ignores history | | aka Fighteer I | has no past--and no future." | | mailto:fighteer AT cs DOT com | | | http://www.cs.com/fighteer | - Lazarus Long | ---------------------------------------------------------------------