delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/10/17:04:52

Date: Sat, 10 Oct 1998 22:03:23 +0100 (BST)
From: George Foot <george DOT foot AT merton DOT oxford DOT ac DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Please: Newbie and "Who's Afraid of C++" needs help w/djgpp
In-Reply-To: <361FAD2A.83A@erols.com>
Message-ID: <Pine.OSF.4.05.9810102154120.24854-100000@sable.ox.ac.uk>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Sat, 10 Oct 1998 dannys AT erols DOT com wrote:

> This is the out put of the set command:

Looks fine, as does your autoexec.bat.

> manifest.txt is:
> 
> BNU252B.MFT
> CSDPMI1B.MFT
> DJDEV200.MFT
> GCC272B.MFT
> GDB412B.MFT
> GPP272B.MFT
> LGP271B.MFT
> TXI360B.MFT

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.

> Under the directory c:\whos\normal this is what I typed to compile the
> program itemtst1:
> 
> mk itemtst1
> 
> Since I am a relative novice at programming I may have made a mistake in
> carrying out your final request, but this is exactly what I typed and
> what was generated. Please let me know what I did wrong.
> 
> c:\whos\normal>redir -o output.txt -eo gcc -v mk itemtst1

It's wrong.  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.  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.

-- 
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