public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Using std::basic_string<int> results in link error
@ 2004-10-21  4:35 Lourens Janse van Rensburg
  0 siblings, 0 replies; 2+ messages in thread
From: Lourens Janse van Rensburg @ 2004-10-21  4:35 UTC (permalink / raw)
  To: Jean-Francois Im, gcc-help


I had the same thing -- a kind gentleman named Mathieu Fluhr
<mfluhr@nero.com> sent me a modified version of char_traits.h, which I
simply dropped into gcc-home-directory/include/c++/3.x/bits/ and
replaced the old one with his modified one.  Fixed all my problems.

I don't know if I'm allowed to give the file to you but I'm sure if you
ask him he will send it to you.  They say it's been fixed in libstdc++ 6
which comes with gcc 3.4, but I haven't verified this.  I have to stick
with gcc 3.2.3 for now.

See also: http://lists.debian.org/debian-gcc/2004/08/msg00271.html

Lourens...


-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Jean-Francois Im
Sent: 19 October 2004 21:41
To: gcc-help@gcc.gnu.org
Subject: Using std::basic_string<int> results in link error


The cause of this problem seems to be rooted in the fact that templates
are in libstdc++ instead of being compiled when using the STL. Is there
a parameter that can be passed to g++ to tell it to compile the STL
templates on the fly instead of using the precompiled ones?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Using std::basic_string<int> results in link error
@ 2004-10-19 19:41 Jean-Francois Im
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Francois Im @ 2004-10-19 19:41 UTC (permalink / raw)
  To: gcc-help

Hi,

I am porting a program to GNU/Linux which uses the ICU library. Parts
of this code uses the std::basic_string<> template with the UChar32
type from ICU (http://oss.software.ibm.com/icu/apiref/umachine_8h.html#a35).
However, this results in errors at link time.

For example, this simple program does not compile(if it does, change
int to long or float or another non-char and non-wchar_t type) :

#include <string>

int main() {
       std::basic_string<int> foo;
       foo+=(int)'a';
       return 0;
}

The cause of this problem seems to be rooted in the fact that
templates are in libstdc++ instead of being compiled when using the
STL. Is there a parameter that can be passed to g++ to tell it to
compile the STL templates on the fly instead of using the precompiled
ones?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-21  4:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-21  4:35 Using std::basic_string<int> results in link error Lourens Janse van Rensburg
  -- strict thread matches above, loose matches on Subject: below --
2004-10-19 19:41 Jean-Francois Im

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).