delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/12/01:16:47

From: George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Please help. Gcc won't compile.
Date: 12 Jun 1998 03:51:19 GMT
Organization: Oxford University, England
Lines: 47
Message-ID: <6lq8jn$f0m$3@news.ox.ac.uk>
References: <19980612022836 DOT 26970 DOT qmail AT hotmail DOT com>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Thu, 11 Jun 1998 19:28:35 PDT in comp.os.msdos.djgpp SAURABH
KAUSHIK <sk72 AT hotmail DOT com> wrote:

: C:\>c:\djgpp\gcc2721b\bin\gcc hello.c
: gcc.exe: hello.c: No such file or directory (ENOENT)
: gcc.exe: No input files

What on earth are you doing? :) Firstly, if gcc.exe is in that
directory then you misinstalled djgpp.  Delete it all and unzip all of
the zip files, preserving the directory structures (as you did before)
but unzip them all from the same place -- c:\djgpp.  You end up with
all of the .exe files in c:\djgpp\bin, for instance.

Secondly, gcc is not psychic; it can't guess where `hello.c' is.  What
you wrote above is trying to read it from the current directory,
i.e. the root directory.  The next one is trying to get it from the
directory where `gcc.exe' is.  The last one is the same as the first,
but you tried to put in the verbose switch; you got it wrong though.
You should write `-v', not `v-'.

If you set up djgpp properly (which you did, apart from the directory
structure problem) then you don't need to give a path to gcc.exe --
you've already put c:\djgpp\bin in your path so you can just type:

    gcc hello.c

from whatever directory `hello.c' is in.

Finally, you did write a `hello.c', didn't you?  I get the vague
impression that you think one is included with djgpp; it's not.  All
you need to put in it is something like this:

    #include <stdio.h>
    
    int main (void)
    {
        puts ("Hello, cruel world!");
        return 0;
    }

BTW, when the FAQ said to include your autoexec.bat, it meant the text
of the file -- not the effect of running it.

-- 
george DOT foot AT merton DOT oxford DOT ac DOT uk

xu do tavla fo la lojban  --  http://xiron.pc.helsinki.fi/lojban/lojban.html

- Raw text -


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