This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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: libstdc++/3593: link error when using ofstream


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


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