[OCLUG-devel] warning: incompatible implicit declaration of built-in function blah

Doug Jolley ddjolley at gmail.com
Sat Aug 27 11:52:43 PDT 2005


I am persistently trying to learn C. It is a struggle for me.

I had a program written on a FC2 machine and it compiled just fine and 
seemed to work OK as well. For reasons beyond my control, I had to move it 
to a FC4 machine to continue my development. Now
when I try to compile the program I get 3 warnings of the type. 'warning: 
incompatible implicit declaration of built-in function whatever'. In my case 
the functions are strlen, strcpy, and strcat. Here are the lines involved:

char *path2CountFile=(char*)malloc(strlen(cgi_val(entries,"__dataDir"))+12);
strcpy(path2CountFile,cgi_val(entries,"__dataDir"));
strcat(path2CountFile,"/count.dat");

I did some googling. One suggestion that I came across was to include 
stdlib.h. That didn't work; but, even if it had, I don't see why it should 
be suddenly required just because I switched machines. I did encounter one 
comment from an individual stating that he was having this problem on FC4; 
but, from the context it sounded to me like his problems were originating 
elsewhere.

Anyway, I'd really like to understand why I'm suddenly encountering this 
problem. I'd certainly like to know how to fix it. I'm beginning to wonder 
if I need to move back to an FC2 machine for some reason. If I do have to 
move back, I'd sure like to know why I'm making the move.

Thanks for any input.

... doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://localhost.localdomain/pipermail/oclug-devel/attachments/20050827/9e3f8ed4/attachment.html 


More information about the OCLUG-devel mailing list