www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/11/08:51:35

From: dannys AT erols DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Please: Newbie and "Who's Afraid of C++" needs help w/djgpp
Date: Sun, 11 Oct 1998 08:44:29 -0400
Lines: 72
Message-ID: <3620A82D.62C8@erols.com>
References: <Pine DOT OSF DOT 4 DOT 05 DOT 9810102154120 DOT 24854-100000 AT sable DOT ox DOT ac DOT uk>
NNTP-Posting-Host: 207-172-192-194.s3.as4.nyd.erols.com
Mime-Version: 1.0
X-Trace: winter.news.erols.com 908109935 12388 207.172.192.194 (11 Oct 1998 12:45:35 GMT)
X-Complaints-To: abuse AT rcn DOT com
X-Mailer: Mozilla 3.0Gold (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> OK, that's an old djgpp -- version 2.00.  The latest is version
> 2.01.  But still, as far as I can see the packages you have
> should be compatible with each other.

Should I update to 2.01 or stick with what I already have? I don't want
to introduce any more variables unecessarily at this point. Just want to
get up and running with learning.

 
> >
> > c:\whos\normal>redir -o output.txt -eo gcc -v mk itemtst1
> 
> It's wrong.  

Do you mean that I entered it under the wrong directory or what?

You need to find the exact time(s) when your batch
> files call `gcc', and modify the batch files at those points,
> putting "redir -o output.txt -eo" before the "gcc" part, and
> "-v" after it.  `redir' is a djgpp utility that stores the error
> messages in a file; everything from `gcc' onwards in the example
> line I gave should be the command line for gcc.  But, it doesn't
> work through batch files -- so you have to modify the batch file
> itself.
> 
> It's a shame nobody here seems to have experience of the book
> you are using.  

Agreed!

I suggest you try this for now though to check
> your installation fully:
> 
> 1) Make a file called "hello.c" that contains these two lines:
> 
>        #include <stdio.h>
>        int main (void) { puts ("Hello world!"); return 0; }
> 
> 2) From whatever directory you put `hello.c' in, run this
>    command:
> 
>        gcc -v -O2 -Wall hello.c -o hello.exe
> 
>    This should create `hello.exe' which you can execute.  If
>    this happens, your djgpp installation is fine and the batch
>    files you are running are the problem.
> 
>    If you get errors on the above compilation, something is
>    wrong with your installation.  Post the error messages here,
>    perhaps using `redir':
> 
>        redir -o output.txt -eo gcc -v -O2 -Wall hello.c -o hello.exe
> 
> The error messages you see are usually of the form:
> 
>     hello.c:2:(error message)
> 
> `hello.c' is the filename of the source file that created the
> error.  `2' is the line number within that file.  Perhaps this
> can help you find out why the files you're compiling are
> generating error messages, even if you can't post the error
> messages here.

Thanks George. I did all of the above and the compilation seemed not to
work. ie hello.exe was not created. Output.txt reads as follows:

gcc.exe: hello.c: No such file or directory (ENOENT)
Reading specs from c:/djgpp/lib\specs
gcc.exe: unrecognized option `-02'
gcc version 2.7.2

Does this shed any light?

- Raw text -


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