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 |
Message-ID: | <2E74F312D6980D459F3A05492BA40F8D4E8EA8@clue.transas.com> |
From: | Andrew Volkov <Andrew DOT Volkov AT transas DOT com> |
To: | Matthew Smith <matts AT bluesguitar DOT org> |
Cc: | cygwin AT sources DOT redhat DOT com |
Subject: | RE: Trouble compiling a C++ Program |
Date: | Wed, 28 Nov 2001 17:36:00 +0300 |
MIME-Version: | 1.0 |
X-Mailer: | Internet Mail Service (5.5.2653.19) |
Try g++ Welcome.cpp -o Welcome.exe or gcc Welcome.cpp -o Welcome.exe -lstdc++ Regards Andrey Volkov > -----Original Message----- > From: Matthew Smith [mailto:matts AT bluesguitar DOT org] > Sent: Wednesday, November 28, 2001 9:32 AM > To: Craig Sproule > Cc: Cygwin > Subject: Re: Trouble compiling a C++ Program > > > > Use g++ to compile it, not gcc. > > cheers, > -Matt > > > > To Cygwin gcc gurus, > > > > 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' > > > > welcome.cpp: undefined reference to > > `ostream::operator<<(char const *)' > > collect2: ld returned 1 exit status > > > > ---------------------------------------- > > I have been using Cygwin for a while, and have > > compiled more complex programs than this on it before. > > > > So my question is, how do I get Cygwin to compile this > > program? > > > > Regards > > Craig Sproule > > > > -- > 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/ > -- 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 |