delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/04/10:15:07

From: Alex Vinokur <alexvn AT bigfoot DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: gcc, gxx, gpp
Date: Tue, 04 Sep 2001 17:01:03 +0200
Organization: Scopus Network Technologies
Lines: 56
Message-ID: <3B94ECAF.17E8D1E4@bigfoot.com>
NNTP-Posting-Host: gateway.scopus.co.il (194.90.203.161)
Mime-Version: 1.0
X-Trace: fu-berlin.de 999612069 5325059 194.90.203.161 (16 [79865])
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

<QUOTE from ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/readme.1st>

To compile a C or C++ source file into an object file, use this
command line:

        gcc -c -Wall myfile.c  (for C source)
  or
        gcc -c -Wall myfile.cc (for C++ source)

This produces the object file myfile.o.  The `-Wall' switch turns on
many useful warning messages which are especially beneficial for new
users of GCC.  (Other C++ extensions, like .cpp, are also supported,
see section 8.4 of the FAQ, "How does GCC recognize the source
language", for details.)

To link several C object files into an executable program, use a
command line such as this:

        gcc -o myprog.exe mymain.o mysub1.o mysub2.o

This produces `myprog.exe' which can be run from the DOS prompt.

To link a C++ program, use gxx instead of gcc, like this:

        gxx -o myprog.exe mymain.o mysub1.o mysub2.o

</QUOTE>

I would like C++ compiler.

Questions :
  1. Does
         gcc -Wall myfile.cc
     create executable program for C++ source ?

  2. If the answer on question#1 is NO :
     Must *executable program for C++ source* be created in 2 steps :
     gcc -c -Wall myfile.cc
     gxx -o myprog.exe myfile.o ?

  3. Is gpp C++-compiler ?
     In other words, does
         gpp -Wall myfile.cc
     create executable program for C++ source ?

Thanks in advance,

  ===========================
  Alex Vinokur
    mailto:alexvn AT bigfoot DOT com
    http://up.to/alexvn
    http://go.to/alexv_math
  ===========================


- Raw text -


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