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 X-Originating-IP: [67.9.128.143] X-Originating-Email: [lingua2003 AT hotmail DOT com] X-Sender: lingua2003 AT hotmail DOT com From: "David" To: References: <20040327102854 DOT 6153 DOT qmail AT web21412 DOT mail DOT yahoo DOT com> <6 DOT 0 DOT 1 DOT 1 DOT 0 DOT 20040329143523 DOT 036a6818 AT 127 DOT 0 DOT 0 DOT 1> <6 DOT 0 DOT 1 DOT 1 DOT 0 DOT 20040330144914 DOT 03697670 AT 127 DOT 0 DOT 0 DOT 1> Subject: Re: gcc: std::cout problem Date: Tue, 30 Mar 2004 19:47:36 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-ID: X-OriginalArrivalTime: 31 Mar 2004 01:47:38.0281 (UTC) FILETIME=[258EF990:01C416C2] X-IsSubscribed: yes I got several "delivery-fail mails" when I created a new message. That's why I used one old message, and the body of the message might look incomplete. I realized that it's from the encoding type later, after I sent the message. Anyway, Thank you. It works now~~~ David ----- Original Message ----- From: "Igor Pechtchanski" To: "David" Cc: Sent: Tuesday, March 30, 2004 7:11 PM Subject: Re: gcc: std::cout problem > On Tue, 30 Mar 2004, David wrote: > > > The source code was: > > ------------------------------------------------------- > > #include > > > > int main() > > { > > > > std::cout << "Hello,World!"; > > > > } > > > > -------------------------------------------- > > > > and from the shell: > > > > ---------------------------------------------- > > $ gcc HelloWorld.cpp > > /cygdrive/c/DOCUME~1/dAvId/LOCALS~1/Temp/ccEM3ulm.o(.text+0x37):HelloWorld.c pp: undefined reference to `std::cout' > > /cygdrive/c/DOCUME~1/dAvId/LOCALS~1/Temp/ccEM3ulm.o(.text+0x3c):HelloWorld.c pp: undefined reference to `std::basic_ostream >& std::operator<< >(std::basic_ostream >&, char const*)' > > /cygdrive/c/DOCUME~1/dAvId/LOCALS~1/Temp/ccEM3ulm.o(.text+0x65):HelloWorld.c pp: undefined reference to `std::ios_base::Init::Init[in-charge]()' > > /cygdrive/c/DOCUME~1/dAvId/LOCALS~1/Temp/ccEM3ulm.o(.text+0x80):HelloWorld.c pp: undefined reference to `std::ios_base::Init::~Init [in-charge]()' > > collect2: ld returned 1 exit status > > > > Is this normal? With std::cout error? > > I mean, is this from the source code itself? > > To me, the source looks fine, though. > > > > Thank you in advance. > > David > > (a) Use 'g++' to link C++ code. > (b) Please start a new thread when switching topics, rather than > continuing old threads. > Igor > -- > http://cs.nyu.edu/~pechtcha/ > |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu > ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com > |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. > '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! > > "I have since come to realize that being between your mentor and his route > to the bathroom is a major career booster." -- Patrick Naughton > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/