Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <79218202D4B9D4118A290002A508E13B79C3E9@PNZEXCHANGE>
From: Ross Smith <rosss@pharos.co.nz>
To: "'Brian R. Gaeke'" <gaeke@uiuc.edu>
Cc: cygwin@cygwin.com
Subject: RE: ld -r errors with C++ objects
Date: Tue, 12 Aug 2003 11:59:32 +1200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"

> From: Brian R. Gaeke [mailto:gaeke@uiuc.edu]
> 
> > > When I link two particular .o files together into a new 
> relocatable
> > > (using ld -r) I get errors from ld, instead of a new .o file. This
> > > happens in many of our C++ projects, but only on Cygwin. I have
> > > reduced the test cases significantly.
> > 
> > ld doesn't speak C++. Use g++ to link C++ modules.
> 
> Thanks for the advice.  I tried using g++ for the link step. 
> Ordinarily
> that results in ld complaining that it can't find WinMain, which makes
> sense because I am trying to link two .o files which do not constitute
> an entire program.
> 
> I tried passing the -r option to ld using g++'s -Wl,-r option, so that
> it would not expect to see WinMain; that resulted in an error 
> very similar
> to the one that I got before when I simply used ld -r.

Are you using -Ur? If not, RTFM. If you are, I'm out of suggestions.


Ross Smith ...................... Pharos Systems, Auckland, New Zealand

           "Remember when we told you there was no future?
                   Well, this is it." -- Blank Reg

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

