Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <08b601c22bad$3e75cf80$2300a8c0@LAPTOP> From: "Robert Collins" To: "Motivus" , References: <20020715030536 DOT 5752 DOT qmail AT web40208 DOT mail DOT yahoo DOT com> Subject: Re: Cygwin/GCC can't link my code... either. Date: Mon, 15 Jul 2002 13:10:58 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Use g++, not gcc. Rob ----- Original Message ----- From: "Motivus" To: Sent: Monday, July 15, 2002 1:05 PM Subject: Cygwin/GCC can't link my code... either. > But it's only "Hello World!"... > > In my case, I'm running W2k & the latest Cygwin. I've searched the list (where > I expected to find my answer right away), the FAQ, the docs... but turned up > nothing. > > The code: > > #include > > int main() > { > std::cout << "Hello world!\n"; > return 0; > } > > The message: > > $ gcc hello.cpp > /cygdrive/c/DOCUME~1/MOTIVU~1/LOCALS~1/Temp/ccCvXb2l.o(.text+0x24):hello.cpp : > un > defined reference to `cout' > /cygdrive/c/DOCUME~1/MOTIVU~1/LOCALS~1/Temp/ccCvXb2l.o(.text+0x29):hello.cpp : > un > defined reference to `ostream::operator<<(char const *)' > collect2: ld returned 1 exit status > > Please help. > > motivus > > __________________________________________________ > Do You Yahoo!? > Yahoo! Autos - Get free new car price quotes > http://autos.yahoo.com > > -- > 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/