RE: std::strcpy is not a member

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
*/
/*START INCLUDE*/
#include <stdio.h>
#include <string.h>


using namespace std;

/* STOP INCLUDE*/

main()
{
 char s[10];

 std::strcpy(s,"NO TAG");
 printf("%s\n",s);

}

Hope this is ok. Thanks much

With Regards

Vardhan

-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of Andrew Haley
Sent: Tuesday, February 23, 2010 10:47 AM
To: Vardhan, Sundara (GE Infra, Energy)
Cc: gcc-help@xxxxxxxxxxx
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.

Andrew.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux