makefile & include problems
Posted on 2004-11-03
Can someone please shed light onto the following problem I am having.
If I use the makefile from assignment#1 even simple
char * x = strdup("hello");
/usr/bin/g++ -Wall -ansi -c -g -I./ -I/usr/include -I/usr/include -I/usr/incl
-o Test.o Test.cpp
Test.cpp: In function `void useless()':
Test.cpp:6: : implicit declaration of function `int strdup(...)'
Test.cpp:6: : initialization to `char *' from `int' lacks a cast
The problem appears to be when using the C functions from C++
Is there a way to bypass or fix?