From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28784 invoked by alias); 28 Nov 2001 14:36:14 -0000 Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@sources.redhat.com Received: (qmail 28724 invoked from network); 28 Nov 2001 14:36:09 -0000 Received: from unknown (HELO harvester.transas.com) (193.125.200.2) by hostedprojects.ges.redhat.com with SMTP; 28 Nov 2001 14:36:09 -0000 Received: from localhost (localhost [127.0.0.1]) by harvester.transas.com (Postfix) with SMTP id 8073B6B825; Wed, 28 Nov 2001 17:36:07 +0300 (MSK) Received: from clue.transas.com (clue.transas.com [10.0.0.42]) by harvester.transas.com (Postfix) with ESMTP id B59096B821; Wed, 28 Nov 2001 17:36:01 +0300 (MSK) Received: by clue.transas.com with Internet Mail Service (5.5.2653.19) id ; Wed, 28 Nov 2001 17:36:01 +0300 Message-ID: <2E74F312D6980D459F3A05492BA40F8D4E8EA8@clue.transas.com> From: Andrew Volkov To: Matthew Smith Cc: cygwin@sources.redhat.com Subject: RE: Trouble compiling a C++ Program Date: Sun, 18 Nov 2001 19:42:00 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2001-11/txt/msg01145.txt.bz2 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@bluesguitar.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 > > > > 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/ From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Volkov To: Matthew Smith Cc: cygwin@sources.redhat.com Subject: RE: Trouble compiling a C++ Program Date: Wed, 28 Nov 2001 06:36:00 -0000 Message-ID: <2E74F312D6980D459F3A05492BA40F8D4E8EA8@clue.transas.com> X-SW-Source: 2001-11/msg01733.html Message-ID: <20011128063600.lnNIsqzcefIBJ1hhuMiIkH1gdOncOqwr5pbBrHAASow@z> 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@bluesguitar.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 > > > > 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/