www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/11/07:47:36

From: firewind <firewind AT metroid DOT dyn DOT ml DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: newbie needing help with rhide
Date: 7 Sep 1997 05:53:35 GMT
Organization: Netcom
Lines: 59
Message-ID: <5utfgv$6lt@sjx-ixn8.ix.netcom.com>
References: <5us2jf$4u9$1 AT newsd-199 DOT bryant DOT webtv DOT net> <19970907051900 DOT BAA24278 AT ladder02 DOT news DOT aol DOT com>
NNTP-Posting-Host: elp-tx1-25.ix.netcom.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Br5an <br5an AT aol DOT com> wrote:
> takahashi writes,

> >i've been trying for the past couple of days trying to compile a >simple
> c program. its like this:

> >#include "stdio.h"
   ^^^^^^^^^^^^^^^^^^
Decent style rules say to write this #include <stdio.h> unless you have a
good reason not to; see below.

> >void main()
   ^^^^^^^^^^^
This should be int main(void)

> >   {
> >       printf("hello");
> >   }

> >i have tried to compile this using rhide and everytime i get an
> >errormessage that says something like....
> >ERROR:c:\dos\rhaaaaa/
> >could not create hello.o or directory does not exist

A more exact error would help?

> >i stayed up all night trying to get it to work but never got it. any of
> >yall run into this kind of problem?

> It may be because you used
> #include "stdio.h"          /* look in current directory */
> rather than
> #include <stdio.h>        /* look in compiler include directory */

"Similarly, a control line of the form

"	#include "filename"

"searches first in association with the original source file [...] and if
that search fails, then as if in the first [#include <filename>] form."

	-- K&R, Section A12.4, Page 231

Therefore, while it is extremely bad style, #include "stdio.h" would work
correctly, unless some replacement "stdio.h" is found in the current
directory, in which case this was most likely the intent.

> also your autoexec.bat file should include something similar to this:
> SET PATH=%PATH%;C:\DJGPP\BIN
> SET DJGPP=C:\DJGPP\DJGPP.ENV

Yes, most likely the problem is with the setup. Are the mentioned variables
defined correctly? Were the archives unpacked with the correct directory
structure?

-- 
[- 				 firewind	                            -]
[-   email: firewind AT metroid DOT dyn DOT ml DOT org (home), firewind AT aurdev DOT com (work)  -]
[- 	    "You're just jealous because the voices talk to -me-."          -]

- Raw text -


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