This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/3593: link error when using ofstream
- From: Craig Rodrigues <rodrigc at attbi dot com>
- To: bkoz at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 29 Mar 2002 21:36:01 -0000
- Subject: Re: libstdc++/3593: link error when using ofstream
- Reply-to: Craig Rodrigues <rodrigc at attbi dot com>
The following reply was made to PR libstdc++/3593; it has been noted by GNATS.
From: Craig Rodrigues <rodrigc@attbi.com>
To: gcc-gnats@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, db@rtsffm.com, bkoz@gcc.gnu.org
Subject: Re: libstdc++/3593: link error when using ofstream
Date: Fri, 29 Mar 2002 16:35:29 -0500
Hi,
If you take a version of gcc which was compiled on a system
with glibc 2.1, and then use that binary on a system with glibc 2.2,
then you will get these kinds of link errors because
between glibc 2.1 and 2.2, mbstate_t changed from a typedef
to a macro.
I reported this error on the libstdc++ mailing list in Feb. 2001 here:
http://gcc.gnu.org/ml/libstdc++/2001-02/msg00100.html
I posted a summary of the mbstate_t problem to the glibc mailng list here:
http://sources.redhat.com/ml/libc-alpha/2001-02/msg00149.html
So the solutions are:
- if you are using a binary distribution of gcc, make sure that you are
using it on a system with exactly the same version of glibc on which it
was built. One way to do this is to stick to mainstream packaged
distributions you can yell at packagers like Red Hat, Debian, Mandrake,
etc. if something goes wrong.
or:
- rebuild gcc yourself from source on the system where you will be using gcc
This problem has been posted on the gcc mailing lists
at various times:
http://gcc.gnu.org/ml/gcc-help/2001-07/msg00171.html
http://gcc.gnu.org/ml/gcc-help/2001-06/msg00113.html
http://gcc.gnu.org/ml/gcc-bugs/2001-07/msg00247.html
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@attbi.com