From: Alex Vinokur 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 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit 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 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 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 ===========================