Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Originating-IP: [150.101.116.69] X-Originating-Email: [tilps AT hotmail DOT com] X-Sender: tilps AT hotmail DOT com From: "Gareth Pearce" To: Subject: RE: G++ for CygWin Date: Wed, 28 Jan 2004 22:57:23 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: Message-ID: X-OriginalArrivalTime: 28 Jan 2004 11:57:28.0715 (UTC) FILETIME=[E721DDB0:01C3E595] X-IsSubscribed: yes > > (gnu separated out its frontend from its backend with v3.3) > > AFAIR, the only significant difference between gcc.exe and g++.exe is > that > gcc.exe assumes files are C by default, and hence calls out to the cc1.exe > compiler, whereas g++ assumes programs are C++ by default, and so calls > out > to cc1plus.exe. Oh, and g++ also adds a few directories to the default > includes search path, and adds -lstdc++ to the linker line. > > This is more-or-less the same thing that happens when you use the -x > language option: "gcc.exe -xc++ " amounts to almost the > same > thing as "g++.exe ", and similarly "g++.exe -xc options>" is almost the same as "gcc.exe ". > I'd like to point out here that if your compiling c++ files, use g++. A common problem is people who are used to being able to use gcc and just add -lstdc++ to the link, which worked successfully back with gcc2. It doesn't always work with gcc3 - hence just use g++, it is simpler and you don't have to worry about the details, now - or in the future. Its also worth noting that gcc doesn't assume files are c by default, gcc makes a guess based on the file extension. But again, the guess mode isn't always the same as using the -x option. (although it probably should be the same, some of the internals don't actually understand the -x options and use file extension guess work exclusively) Gareth -- 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/