Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Sun, 11 Feb 2001 14:50:03 -0500
From: Christopher Faylor <cgf@redhat.com>
To: cygwin@cygwin.com
Subject: Re: Trying to compile a simple C++ program
Message-ID: <20010211145003.A14319@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <001201c0940b$08c8c3a0$ac07f8d4@1> <20010212225717.A5592@systematik.co.nz> <20010212230001.A5692@systematik.co.nz> <m366ih349q.fsf@master.athome>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.11i
In-Reply-To: <m366ih349q.fsf@master.athome>; from flognat@flognat.myip.org on Sun, Feb 11, 2001 at 11:25:37AM +0100

On Sun, Feb 11, 2001 at 11:25:37AM +0100, Andrew Markebo wrote:
>/ Dan Plimak <danp@systematik.co.nz> wrote:
>| [...]
>| $ gcc -lstdc++ -o a.exe a.cpp
>
>Throw -lstdc++ at the end and finally on the third try everything will
>work and the sun will shine and birds will sing and yah you know all
>of that.
>
>        gcc -o a.exe a.cpp -lstdc++ 
>
>Or you can do it the lazy-mans way, use g++ to compile c++ files, then
>you don't need to worry about what extras you need to link in for c++
>support.
>
>        g++ -o a.exe a.cpp -lstdc++ 

g++ -o a.exe a.cpp

is the correct way to compile a g++ program.  You shouldn't need an extra
-lstdc++.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

