Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Conflicts in memcopy declaration

Reply
Thread Tools

Conflicts in memcopy declaration

 
 
JeanDean
Guest
Posts: n/a
 
      02-13-2007

Hi ,

I am trying to use "User-difned allocator " but on compilation it is
giving conflicts for memcopy
declarations with in string.h .

Please refer the below code :

any suggestions how to resolve this???

g++ -g -DUNIX -DLINUX -DX86 -DCONIC_X86 -DCOMP_X86 -DDRAW_X86 -
DDR_X86 -DDEBUG -DDEBUGforCDC -DDEBUG_COMMANDLOG -DSUPPORT_IPS -
DTARGET_IRIPS -DTARGET_06S -DUSE_MEMCPY -DBUGFIX_RPCS_SPL_FLUSH -
DBUGFIX_POLYLINE_CLIP -I. -I../src -I../include -I../../include -I../
include/gps -I../../libge/include -I../../libdraw3/include -I../../
libipa/inc -I../../libdi/inc -c -o render.o ../src/render.c
In file included from /usr/include/g++-3/stl_algobase.h:48,
from /usr/include/g++-3/vector:30,
from ../include/pr_internal.h:15,
from ../include/object.h:9,
from ../include/spool.h:13,
from ../src/render.c:27:
/usr/include/string.h:242: declaration of C function `void memcpy
(void
*, const void *, unsigned int)' conflicts with
/usr/include/string.h:42: previous declaration `void *memcpy (void *,
const void *, unsigned int)' here

 
Reply With Quote
 
 
 
 
mliptak
Guest
Posts: n/a
 
      02-13-2007
On Feb 13, 7:51 am, "JeanDean" <(E-Mail Removed)> wrote:
> Hi ,
>
> I am trying to use "User-difned allocator " but on compilation it is
> giving conflicts for memcopy
> declarations with in string.h .
>
> Please refer the below code :
>
> any suggestions how to resolve this???
>
> g++ -g -DUNIX -DLINUX -DX86 -DCONIC_X86 -DCOMP_X86 -DDRAW_X86 -
> DDR_X86 -DDEBUG -DDEBUGforCDC -DDEBUG_COMMANDLOG -DSUPPORT_IPS -
> DTARGET_IRIPS -DTARGET_06S -DUSE_MEMCPY -DBUGFIX_RPCS_SPL_FLUSH -
> DBUGFIX_POLYLINE_CLIP -I. -I../src -I../include -I../../include -I../
> include/gps -I../../libge/include -I../../libdraw3/include -I../../
> libipa/inc -I../../libdi/inc -c -o render.o ../src/render.c
> In file included from /usr/include/g++-3/stl_algobase.h:48,
> from /usr/include/g++-3/vector:30,
> from ../include/pr_internal.h:15,
> from ../include/object.h:9,
> from ../include/spool.h:13,
> from ../src/render.c:27:
> /usr/include/string.h:242: declaration of C function `void memcpy
> (void
> *, const void *, unsigned int)' conflicts with
> /usr/include/string.h:42: previous declaration `void *memcpy (void *,
> const void *, unsigned int)' here


Post your question to gnu.g++.help
m

 
Reply With Quote
 
 
 
 
Grizlyk
Guest
Posts: n/a
 
      02-13-2007

JeanDean wrote:
>
> /usr/include/string.h:242: declaration of C function
> `void memcpy (void *, const void *, unsigned int)'


wrong std::memcpy declaration "void memcpy"

#include <string.h>

void *memcpy(void *dest, const void *src, int num);

Description
-----------

This function copies NUM bytes from SOURCE to DEST. It assumes that
the source and destination regions don't overlap; if you need to copy
overlapping regions, use `memmove' instead.

Return Value
------------

DEST

Portability
-----------

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001


> conflicts with
> /usr/include/string.h:42: previous declaration
> `void *memcpy (void *, const void *, unsigned int)' here



--
Maksim A. Polyanin

"In thi world of fairy tales rolls are liked olso"
/Gnume/


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
declaration of C function - conflicts rherring@tampabay.rr.com C++ 11 05-02-2006 04:06 AM
Re: memcopy, memmove Implementation Trewth Seeker C Programming 0 07-14-2003 05:17 PM
Re: memcopy, memmove Implementation Micah Cowan C Programming 0 06-26-2003 02:52 AM
Re: memcopy, memmove Implementation Dan Pop C Programming 1 06-24-2003 01:42 PM
Re: memcopy, memmove Implementation Dan Pop C Programming 0 06-24-2003 12:17 PM



Advertisments