delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/23/10:24:16

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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: <CDDB93E84A8DD411B01900D0B78278400DF43DD5@IE10-SAHARA>
From: "Trimurthi, Swamy(IE10)" <Trimurthi DOT Swamy AT honeywell DOT com>
To: cygwin AT cygwin DOT com, Trimurthi DOT Swamy AT honeywell DOT com
Subject: RE: linking problem, please help
Date: Mon, 23 Dec 2002 07:17:48 -0700
MIME-Version: 1.0

Hi Igor,
	Thanks for the information and guidance. I will avoid sending
personal mails hereafter.
regards,
Trimurthi 

> -----Original Message-----
> From:	Igor Pechtchanski [SMTP:pechtcha AT cs DOT nyu DOT edu]
> Sent:	Monday, December 23, 2002 7:55 PM
> To:	Trimurthi, Swamy(IE10)
> Cc:	cygwin AT cygwin DOT com
> Subject:	Re: linking problem, please help
> 
> Trimurthi,
> 
> The cygwin mailing list is the proper place for such inquiries.  It is
> strongly discouraged to send personal mail with such requests, and they
> will, in general, be ignored.  I've forwarded this request to the proper
> mailing list, and reset the Reply-to: field accordingly for your
> convenience.
> 	Igor
> 
> On Mon, 23 Dec 2002, Trimurthi, Swamy(IE10) wrote:
> 
> > Hi Pechta,
> >      I found your mail id while searchig for some solution on the
> internet
> > regarding a linking problem I am facing. It would be of great help to me
> if
> > I can get some guidance from you.  I am using cygwin version [ GNU bash,
> > version 2.05.0(8)-release (i686-pc-cygwin) ] on a WinNT machine, x86
> > processor. I was trying to link the following sample code
> >
> > *************************************
> >
> > #include<iostream>
> >
> > int main()
> > {
> > 	cout<<"\n hello world";
> > 	return 0;
> > }
> >
> > **************************************
> > I was able to compile the code using the following command
> > g++ -c test.cpp
> > and generated the object code test.o, but I was not able to link it
> using ld
> > and hence unable to generate the exe
> > I gave the ld command and following was the output
> > *************************************************
> > $ ld -o test C:/cygwin/lib/crt0.o test.o -lc
> > test.o(.text+0x24):test.cpp: undefined reference to `cout'
> > test.o(.text+0x29):test.cpp: undefined reference to
> > `ostream::operator<<(char const *)'
> > test.o(.text$__tf3ios+0x29):test.cpp: undefined reference to `__rtti_si'
> > test.o(.text$__tf9streambuf+0x29):test.cpp: undefined reference to
> > `__rtti_si'
> > test.o(.text$__tf7filebuf+0x29):test.cpp: undefined reference to
> `__rtti_si'
> > test.o(.text$__tf7ostream+0x28):test.cpp: undefined reference to
> > `__rtti_class'
> > test.o(.text$__tf7istream+0x28):test.cpp: undefined reference to
> > `__rtti_class'
> > test.o(.text$__tf8iostream+0x30):test.cpp: undefined reference to
> > `__rtti_class'
> > test.o(.text$__tf22_IO_istream_withassign+0x28):test.cpp: undefined
> > reference to `__rtti_class'
> > test.o(.text$__tf22_IO_ostream_withassign+0x28):test.cpp: undefined
> > reference to `__rtti_class'
> > test.o(.text$__tf11_ios_fields+0x1d):test.cpp: undefined reference to
> > `__rtti_user'
> > test.o(.text$__tf8_IO_FILE+0x1d):test.cpp: undefined reference to
> > `__rtti_user'
> > /usr/lib/libc.a(_cygwin_crt0_common.o): In function
> `cygwin_crt0_common':
> >
> /cygnus/netrel/src/cygwin-1.3.3-2/winsup/cygwin/lib/_cygwin_crt0_common.cc
> :9
> > 0: undefined reference t
> > o `GetModuleHandleA AT 4'
> > **************************************************
> > Could you guide me like where the problem is and whether do I need to
> > include crtbegin and crtend files. When these files are generally
> required.
> > I am eager to hear from you
> >
> > thanks in advance,
> > regards,
> > Trimurthi
> 
> -- 
> 				http://cs.nyu.edu/~pechtcha/
>       |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
> ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
>      |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
>     '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
> 
> Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
>   -- /usr/games/fortune

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019