This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 3.11-2 link error with stdc++


Hi there,

I think it might not be entirely related to cygwin, but something that
changed in gcc in April (versions of gcc 3.1 compiled for cygwin prior to
that date don't give this result).

Sorry for the lack of code, but its 1am in the morning here and I haven't
whittled the code down to a state in which I can send it.  As soon as I do
and if noone else seeing similar problems (I can't believe its just my stuff
as its pretty standard std::string usage) I will send it.  The
string::replace function *is* being compiled, so maybe it is one of the
following:

1) gcc problem maybe to do with the #pragma gcc header commands - maybe
these commands are "bleeding" to other files causing templates not to save
instantiations (this is my long-shot theory based on experience of trying to
use #pragma interface and #pragma implementation which are similar
functions).
2) its a problem with ld, maybe its throwing away these functions away by
mistake before they can be linked.

btw. gdb works!  Or, at least, I compiled my little Hello World program with
the new set of tools, and gdb let me single-step and debug it without seg.
faulting on me... finger's crossed I can sort out this link issue.

Regards, and thanks for the good work.

---------------------------------
Q-Games, Dylan Cuthbert.
http://www.q-games.com

----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>
Newsgroups: gmane.os.cygwin
Cc: <deo@logos-m.ru>
Sent: Friday, July 12, 2002 12:26 AM
Subject: Re: gcc 3.11-2 link error with stdc++


> On Thu, Jul 11, 2002 at 08:58:42PM +0900, Dylan Cuthbert wrote:
> >Hi there,
> >
> >I have downloaded the very latest 3.11 version of gcc for cygwin.
> >
> >It seems any piece of code using string::replace with iterators causes a
> >link error at the moment, this is the error I get:
> >
> > undefined reference to `
> >std::basic_string<char, std::char_traits<char>, std::allocator<char>
> >>::replace(std::__normal_iterator<char*, std::basic_string<char,
> >std::char_traits<char>, std::allocator<char> > >,
> >std::__normal_iterator<char*, std::basic_string<char,
> >std::char_traits<char>, std::allocator<char> > >, unsigned, char)'
> >collect2: ld returned 1 exit status
> >
> >If this isn't a cygwin-related problem I'll post to the gcc group,
however,
> >I haven't seen mention of this kind of problem on there.
>
> Sorry.  I can't offer any insight, especially without a test case, but
probably
> not even then.
>
> Maybe Egor might have an idea.
>
> cgf
>
> --
> 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]