This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
error call of overloaded strlen is ambiguous ERROR
- To: gcc-help at gcc dot gnu dot org
- Subject: error call of overloaded strlen is ambiguous ERROR
- From: sherry <sherry at zeroknowledge dot com>
- Date: Tue, 16 Jan 2001 16:07:11 -0500
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