delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/15/03:02:33

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
To: cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
Path: not-for-mail
From: "Dylan Cuthbert" <dylan AT q-games DOT com>
Newsgroups: gmane.os.cygwin
Subject: Re: gcc 3.11-2 link error with stdc++
Date: Mon, 15 Jul 2002 16:04:05 +0900
Lines: 70
Message-ID: <agts1r$5d8$1@main.gmane.org>
References: <agjrom$pge$1 AT main DOT gmane DOT org> <20020711152654 DOT GB8291 AT redhat DOT com> <14382729588 DOT 20020712174822 AT logos-m DOT ru>
NNTP-Posting-Host: pppa183.kyoto-ip.dti.ne.jp
Mime-Version: 1.0
X-Trace: main.gmane.org 1026716541 5544 210.159.246.183 (15 Jul 2002 07:02:21 GMT)
X-Complaints-To: usenet AT main DOT gmane DOT org
NNTP-Posting-Date: Mon, 15 Jul 2002 07:02:21 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

Ok, I've found the blighter...  after tracking down and splitting up the
code etc.  The reason is completely illogical mind you.

Since all this rather dodgy looking __gnu_cxx namespace stuff
(understandable for internal functions etc. but not for classes that are
used by Joe Punter) went into g++ 3.1 for classes that used to be called,
for example "std::hash_map",  I've been compiling with -D__gnu_cxx=std, now
I'd understand things were going wrong if std::string was in the __gnu_cxx
namespace but it isn't.  So I'm flummoxed with regards to finding a reason
for the error to occur.

I whittled it down to a single line that was writing a value into a
std::map<string, string> (not a hash_map which *is* in
__gnu_cxx_namespace_gubbins).  If I remove that line the file links without
the error in my previous mail below.

Very odd indeed, anyway, I'll package up the code and post it to the gnu
mailing list for more info.

Regards

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

"egor duda" <deo AT logos-m DOT ru> wrote in message
news:14382729588 DOT 20020712174822 AT logos-m DOT ru...
> Hi!
>
> Thursday, 11 July, 2002 Christopher Faylor cgf AT redhat DOT com wrote:
>
> CF> On Thu, Jul 11, 2002 at 08:58:42PM +0900, Dylan Cuthbert wrote:
> >>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.
>
> CF> Sorry.  I can't offer any insight, especially without a test case, but
probably
> CF> not even then.
>
> CF> Maybe Egor might have an idea.
>
> Never seen this particular error. Dylan, maybe you can provide a
> testcase? You can also try to debug this error yourself by looking at
> files created with 'gcc -v -save-temps ...' and output of
> 'nm libstdc++.a'
>
> Egor.            mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19
>
>
> --
> 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/

- Raw text -


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