delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Date: | Fri, 21 Sep 2007 23:53:57 -0400 |
From: | Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: gcc does not know about "new" and "delete" |
Message-ID: | <20070922035357.GA25395@ednor.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <46F40C47 DOT 3040005 AT research DOT telcordia DOT com> <46F4741F DOT 80108 AT pacific DOT net DOT sg> <w3fy17l9em DOT fsf AT hod DOT lan DOT m-e-leypold DOT de> |
MIME-Version: | 1.0 |
In-Reply-To: | <w3fy17l9em.fsf@hod.lan.m-e-leypold.de> |
User-Agent: | Mutt/1.5.16 (2007-06-09) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On Sat, Sep 22, 2007 at 04:29:53AM +0200, Markus E L wrote: >Erich Dollansky wrote: > >> Hi, >> >> Framk gave you the answer. > >Was the right answer ... > >> gcc is a plain c compiler. > >... but this is wrong. Gcc determines from the file suffic which language >applies > > .cpp -> c++ > .c -> C > >and so on. > >Calling it as g++ vs. calling it as gcc though determines which >runtimes are linked automatically (and partly which include paths are >set). > > gcc -o x x.cpp -lstdc++ > >works perfectly with the OPs program. That may be but it isn't guaranteed to work perfectly with every single C++ program out there. There are potentially other libraries which might be required for C++. You really should use g++ to link C++ programs. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |