#55735 - Maverick - Sat Oct 01, 2005 7:14 am
I am writing a small app, trying to use a shortcut, when i get an error:
arm9.c:13: error: conflicting types for 'memcpy'
arm9.c:13: error: conflicting types for 'memcpy'
And it wont compile. The memcpy function is:
void memcpy(u8 *dest,u8 *src,int size)
{
while(size--) *dest++ = *src++;
}
Any help would be great. Thanks
#55736 - notb4dinner - Sat Oct 01, 2005 7:23 am
There's a standard library memcpy() function with a signature something like:
void *memcpy (void *dest, const void *src, unsigned size)
The 'conflicting types' error is a result of you redefining it with a different signature. I'd suggest just using the standard library version.
#55739 - Maverick - Sat Oct 01, 2005 8:27 am
Thanks
#55743 - Maverick - Sat Oct 01, 2005 12:22 pm
I have just recieved another error and am completely baffeled, i recently upgraded the devkit from 12 to 16a and didnt have any problems with the same method before. The error reads:
warning: incompatible implicit declaration of built-in function 'sprintf'
any help would be great
Thanks
#55758 - tepples - Sat Oct 01, 2005 6:19 pm
Tried doing #include <stdio.h> ?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#55764 - Maverick - Sat Oct 01, 2005 7:23 pm
Thank you for the help, i tried this soon after posting, unfortunately recieving a pointer to integer error message. I will ignore it for now and try to get SRAM functions built in.
Many thanks