This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: help- URGENT build errors while using gcc
- To: mrs at windriver dot com (mike stump)
- Subject: Re: help- URGENT build errors while using gcc
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Mon, 23 Jul 2001 11:08:30 -0700 (PDT)
- Cc: gcc at gcc dot gnu dot org, meradix at hotmail dot com
> > From: "Radhika Shenoy" <meradix@hotmail.com>
> > To: gcc@gcc.gnu.org
> > Date: Mon, 23 Jul 2001 16:52:21 +0530
>
> > This is because i have a set of old files (created even before the
> > creation of the c++ std libraries) these files have user defined
> > data types named as "set" and "pair". and there is a conflict
> > between these two and the "Stl" set and pair datatypes.
>
> > Is there any way to avoid these errors? i need to use the stl
> > variables too but they are in other files, which are also part of
> > teh same project, the stl set and teh old set are used in two
> > different files. the ordinary CC compilation does not give me these
> > errors!!
>
> > Can you tell me how to tackle this??
>
> Not here. This list is for the discussion of how to create a
> compiler. :-)
>
> You want the, how do I program in C++ list. help-g++@gnu.org would be
> closer to the right list. Also, there is comp.lang.c++ that I think I
> would recommend.
You're perhaps dismissing this guy too quickly, Mike.
The people on the other C++ lists will correctly tell you that this is a
gcc 2.95.x bug, that The STL's "set" and "pair" are supposed to be in the
std namespace. This problem has been fixed in 3.0. With gcc 3.0 or
another conformant C++ compiler, if you don't issue any "using"
directives, then the names for the STL datatypes are std::set and
std::pair.
Just the same, I'm sure people on comp.lang.c++.moderated can show you
awful tricks with the preprocessor to work around this kind of problem.