Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <20011128062415.66208.qmail@web20104.mail.yahoo.com> Date: Wed, 28 Nov 2001 17:24:15 +1100 (EST) From: =?iso-8859-1?q?Craig=20Sproule?= Subject: Trouble compiling a C++ Program To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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 http://shopping.yahoo.com.au - Yahoo! Shopping - Get organised for Christmas early this year! -- 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/