This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [Fwd: Problem with gcc-20010108 snapshot built with stdc++-v3 on redhat7]
- To: sherry <sherry at zeroknowledge dot com>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>
- Subject: Re: [Fwd: Problem with gcc-20010108 snapshot built with stdc++-v3 on redhat7]
- From: John Schmerge <schmerge at cyber dot com>
- Date: Wed, 17 Jan 2001 13:15:43 -0500
- References: <3A64C459.29A2DAE5@zeroknowledge.com>
You should try to use the c++ standard headers instead of the obsolescent 'c'
headers, so instead of
#include <string.h>
use
#include <cstring>
using std::strlen; // to appease the purists in the crowd
Hope this helps,
John Schmerge
sherry wrote:
>
> I am not sure if this is the right mailing list to ask this question ,
> but I am so close and I have been compiling gcc with stdc++-v3 so many times
> ...
>
> > sherry wrote:
> >
> > > Hi,
> > >
> > > Background
> > > I have downloaded gcc 2001/01/08 snapshot
> > > and configured and compiled it with these flags:
> > >
> > > /usr/src/redhat/BUILD/gcc-20010108.src/configure
> > > --prefix=/usr/src/redhat/BUILD/gcc-20010108.install
> > > --enable-libstdcxx-v3
> > > --enable-long-long
> > > --enable-cshadow-headers
> > > --enable-namespaces
> > > --enable-cxx-flags='-fhonor-std'
> > > For compiling my cpp code I use -fhonor-std also.
> > >
> > > Problem:
> > > When compiling the code compiler complains with the following error:
> > > call of overloaded _some_function_like_strlen is ambiguous
> > > /usr/include/string.h candidates are: unsigned int strlen(const char *)
> > > /usr/local/include/g++-v3 /bits/std_cstring.h .... size_t
> > > std::strlen(const char *)
> > >
> > > So it is confused about which function to choose.
> > >
> > > Question
> > > How can I tell the compiler that it should use the files
> > > in /usr/local/include/g++-v3/bits ?
> > >
> > > thx
--
---------------------------
John Schmerge
schmerge@cyber.com