| 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: | Wed, 28 Nov 2001 09:26:12 +0100 |
| From: | "Gerrit P. Haase" <gp AT familiehaase DOT de> |
| X-Mailer: | The Bat! (v1.53t) Business |
| Reply-To: | "Gerrit P. Haase" <cygwin AT cygwin DOT com> |
| Organization: | Esse keine toten Tiere |
| X-Priority: | 3 (Normal) |
| Message-ID: | <117301454478.20011128092612@familiehaase.de> |
| To: | Craig Sproule <craigsproule AT yahoo DOT com DOT au> |
| CC: | cygwin AT cygwin DOT com |
| Subject: | Re: Trouble compiling a C++ Program |
| In-Reply-To: | <20011128062415.66208.qmail@web20104.mail.yahoo.com> |
| References: | <20011128062415 DOT 66208 DOT qmail AT web20104 DOT mail DOT yahoo DOT com> |
| MIME-Version: | 1.0 |
| X-Sender: | 320081107336-0001 AT t-dialin DOT net |
Hallo Craig,
Am 2001-11-28 um 07:24 schriebst du:
> I have downloaded the latest version of CygWin. When I
> compile the following C++ program:
> // Filename: Welcome.cpp
> // A first program in C++
> #include <iostream.h>
> int main()
> {
> cout << "Welcome to C++!\n";
> return 0;
> }
> gcc pops out the following error:
> welcome.cpp: undefined reference to `cout'
> So my question is, how do I get Cygwin to compile this
> program?
$ g++ -o hello2 hello2.cc
$ hello2
Welcome to C++!
I remember that if you use the extension .cc, gcc calls g++
automagically, but it doesn't work.
Ciao,
Gerrit P. Haase mailto:gp AT familiehaase DOT de
--
=^..^=
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |