[uClibc] problem of strdup
kirbyzhu
kirbyzhu at cybertan.com.cn
Tue Mar 1 11:15:54 UTC 2005
hi everyone:
I am build a gcc-2.95 uclibc toolchain for arm with uClibc-snapshot.tar.bz2.
When I compile code like this:
//test.c
#include <stdio.h>
int main(void)
{
char* s=NULL;
s = strdup("hello");
return 0;
}
If I compile it: arm-linux-uclibc-g++ test.c -o test
The compiler get some error like:
test.c: In function `int main()':
test.c:7: implicit declaration of function `int strdup(...)'
test.c:7: assignment to `char *' from `int' lacks a cast
But I use: arm-linux-uclibc-gcc test.c -o test,it is compile ok.
Can anybody tell me why? Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20050301/f15ddcea/attachment-0001.htm
More information about the uClibc
mailing list