| www.delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sources DOT redhat DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sources DOT redhat DOT com> |
| List-Help: | <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT sources DOT redhat DOT com |
| Delivered-To: | mailing list cygwin AT sources DOT redhat DOT com |
| Date: | Mon, 12 Feb 2001 22:57:17 +1300 |
| From: | Dan Plimak <danp AT systematik DOT co DOT nz> |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Trying to compile a simple C++ program |
| Message-ID: | <20010212225717.A5592@systematik.co.nz> |
| References: | <001201c0940b$08c8c3a0$ac07f8d4 AT 1> |
| Mime-Version: | 1.0 |
| User-Agent: | Mutt/1.2.5i |
| In-Reply-To: | <001201c0940b$08c8c3a0$ac07f8d4@1>; from bloomdido@mtu-net.ru on Sun, Feb 11, 2001 at 12:13:11PM +0300 |
On Sun, Feb 11, 2001 at 12:13:11PM +0300, Anton Mochalin wrote:
> Hello.
>
> I typed a simple program into a file 'a.cpp':
>
> #include <iostream.h>
>
> main()
> {
> cout << "Hi!";
> }
>
> and then tried to compile it:
> $ gcc -o a.exe a.cpp
>
You'll be wanting to add -lstdc++ to the command line, as in:
$ gcc -lstdc++ a.exe a.cpp
Oh, and the .cpp extension is nonstandard in the GNU world -- use .cxx or
.cc.
-- danp
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |