Mail Archives: djgpp/1999/08/13/06:10:49
Murphy<
I was not running gcc from the directory that my p1.c was in, (as cited
above in the post from klass).
Doing that - gcc could find my c file - and it worked like a charm.
Note:
the main function works (so far) w/or w/out INT in front of "main".
I wonder why, since it does return 0.
Thanks,
Lee
MuRpHy <the DOT murphy AT snafu DOT de> wrote in message
news:37B328B3 DOT 8B84DEB3 AT snafu DOT de...
> you forgot the INT before main() ...
> and if you are running djgpp from a text editor under windows,
> you have to know, that djgpp is a dos compiler and doesn't
> accept directory- or file-names larger than 8 letters
yeah, i get what u r saying.
> it will output the error message that you wrote:
> {
> gcc.exe: p1.c: No such file or directory (ENOENT)
> gcc.exe: No input files
> }
>
> /* thus is my 1st c program */
> #include <stdio.h>
>
> int main()
> {
> printf ("hello world\n");
> return 0;
> }
>
> Lee Goldblatt wrote:
>
> > here's a chunk of my dos console, I added the two required lines in
my
> > autoexec.bat file, below that I tried to compile and create (i
assume)
> > p1.exe .
> >
> > C:\>path
> > PATH=C:\DJGPP\BIN;C:\WINDOWS;C:\WINDOWS;C:\WINDOWS\COMMAND
> >
> > C:\>gcc p1.c -o p1.exe
> > gcc.exe: p1.c: No such file or directory (ENOENT)
> > gcc.exe: No input files
>
> ----------------------------------------------------------------------
--
> > --------------------------
> >
> > I used a win95 text editor w/the source code:
> > and I pasted this text file into my c:\djgpp folder
> >
> > /* thus is my 1st c program */
> > #include <stdio.h>
> >
> > main()
> > {
> > printf ("hello world\n");
> > return 0;
> > }
> >
>
> ----------------------------------------------------------------------
--
> > -----------------
> >
> > I don't know squat but I'm trying, can anyone make some suggestions
> > to help me compile?
>
- Raw text -