delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/10/12:04:51

From: Charles Terry <cterry AT plinet DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What did I miss ?
Date: Fri, 10 Apr 1998 08:23:49 -0700
Organization: All USENET -- http://www.Supernews.com
Lines: 91
Message-ID: <352E3985.A2D@plinet.com>
References: <199804100142 DOT SAA14888 AT adit DOT ap DOT net> <352e2725 DOT 685785 AT netnews DOT nyu DOT edu>
NNTP-Posting-Host: 19633 AT 207 DOT 174 DOT 3 DOT 130
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Wow I've never seen this much trouble with a setup!

Ryuji Yokoyama wrote:
> 
> On Wed, 08 Apr 1998 21:26:59 -0400, "John M. Aldrich"
> <fighteer AT cs DOT com> wrote:
> 
> >Ryuji Yokoyama wrote:
> >>
> >> I got this file the result of "redir -o err.log -eo g++ -v prog.cpp"
> >
> >After doing this, there should be a file named 'a.out' in the current
> >directory.  Is there?
> >
> >Try the following:  "redir -o err.log -eo g++ -v prog.cpp -o prog.exe"

THE -o BEFORE prog.exe SPECIFIES THE NAME OF THE OUPUT.  THE FIRST
RUN YOU DID HAD NO OUTPUT FILE SPECIFIED SO g++ WOULD CREATE a.out
THE SECOND RUN WOULD CREATE prog.exe
> 
> I got folllowing "err.log" file but not a.exe.



> 
> Using builtin specs.
> gcc version 2.8.0
>  c:/djgpp/lib/gcc-lib/djgpp/2.80/cpp.exe -lang-c++ -v -undef
> -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=8 -Dunix
> -Di386 -DGO32 -DMSDOS -DDJGPP=2 -D__unix__ -D__i386__ -D__GO32__
> -D__MSDOS__ -D__DJGPP__=2 -D__unix -D__i386 -D__GO32 -D__MSDOS
> -D__DJGPP=2 -Asystem(unix) -Asystem(msdos) -Acpu(i386) -Amachine(i386)
> -D__EXCEPTIONS -Di386 -Asystem(unix) -Acpu(i386) -Amachine(i386)
> -D__i386__ -Asystem(unix) -Acpu(i386) -Amachine(i386) prog.cpp
> c:/djgpp/tmp/ccaaaaaa.ii
THE ABOVE IS THE PREPROCESSOR BEING INVOKED TO PARSE prog.cpp
INTO c:/djgpp/tmp/ccaaaaaa.ii

> GNU CPP version 2.8.0 (80386, BSD syntax)
> #include "..." search starts here:
> #include <...> search starts here:
>  c:/djgpp/lang/cxx
>  c:/djgpp/include
>  c:/djgpp/lang/cxx
>  c:/djgpp/lib/gcc-lib/djgpp/2.80/include
>  c:/djgpp/include
> End of search list.

THE ABOVE IS THE INCLUDE SEARCH DONE BY THE PREPROCESSOR
THE ARE NO ERROR MESSAGES SO THE PREPROCESSOR IS HAPPY

THE NEXT IS THE COMPILER COMPILING c:/djgpp/tmp/ccaaaaaa.ii
INTO c:/djgpp/tmp/ccaaaaaa.s
>  c:/djgpp/lib/gcc-lib/djgpp/2.80/cc1plus.exe c:/djgpp/tmp/ccaaaaaa.ii
> -quiet -dumpbase prog.cc -version -o c:/djgpp/tmp/ccaaaaaa.s
> GNU C++ version 2.8.0 (djgpp) compiled by GNU C version 2.8.0.

QUESTION FOR ANYBODY. WHAT IS THE REFERENCE IN THE ABOVE LINES
TO prog.cc? IS IT JUST A TAG BEING PAST ALONG? IS IT WHY GDB WON'T
USE .CPP FILES?

NEXT IS THE ASSEMBLER c:/djgpp/tmp/ccaaaaaa.s TO 
c:/djgpp/tmp/ccaaaaa1.o THE OBJECT FILE
>  as -o c:/djgpp/tmp/ccaaaaaa1.o c:/djgpp/tmp/ccaaaaaa.s

FINALLY THE LINKER  CREATING prog.exe IN THE CURRENT DIRECTORY
>  ld -o prog.exe c:/djgpp/lib/crt0.o -Lc:/djgpp/lib/gcc-lib/djgpp/2.80
> -Lc:/djgpp/lib c:/djgpp/tmp/ccaaaaaa1.o -lstdcxx -lm -lgcc -lc -lgcc
ONCE AGAIN NO ERROR MESSAGES SO THE LINKER THINKS IT'S DONE ITS
JOB.

THE COMMENTS ABOVE ARE FOR RYUJI JUST SO THAT HE KNOWS WHATS HAPPENING
IN THE PROCESS AND MIGHT NOTICE SOMETHING?

ANYWAY MY 2 BITS. (OR 2K BYTES AS THE CASE MAY BE:-)

I would exit windows to the command line.
Create a myprogram directory, move myprog.ccp to it.
run the following commands

g++ -v -c myprog.cpp
then
g++ -v myprog.o -o myprog.exe

after that 
dir

and see what files you've got
good luck
Charles

- Raw text -


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