std::strcpy is not a member

Vardhan, Sundara (GE Infra, Energy)
Tue Feb 23 16:26:00 GMT 2010

Hi Andrew

I apologize for that. Assumed that I would have not built the gcc with
the correct set of configure parameters. Please find below a very simple
test source :

** Includes
#include <stdio.h>
#include <string.h>

using namespace std;


 char s[10];

 std::strcpy(s,"NO TAG");


Hope this is ok. Thanks much

With Regards


-----Original Message-----
From: [] On
Behalf Of Andrew Haley
Sent: Tuesday, February 23, 2010 10:47 AM
To: Vardhan, Sundara (GE Infra, Energy)
Subject: Re: std::strcpy is not a member

On 02/23/2010 03:38 PM, Vardhan, Sundara (GE Infra, Energy) wrote:
> Hi All
> Recently compiled gcc 4.4.3 for AIX using the following configure 
> options :
>  --with-as=/usr/bin/as --with-ld=/usr/bin/ld 
> --enable-languages=c,c++,fortran --prefix=/cots/gnu/gcc443 
> --enable-threads --enable-version-specific-runtime-libs --disable-nls 
> --enable-decimal-float=dpd --host=powerpc-ibm-aix5.3.0.0
> Successfully installed and compiled my application. I get the 
> following error on the C++ code compilation :
> error: 'strcpy' is not a member of 'std'
> The source code does have "using namespace std;"
> The same source code does not have an issue with gcc 4.2.3 on AIX.  Am

> I missing something when building the new compiler version?
> I would very much appreciate if you can give me pointers or solution 
> for this issue.

Send us a test case.

You really should now this by now, you've been posting here long enough.


More information about the Gcc-help mailing list