When I compile using the ‘-Wall’ option I recieve this error for many of the functions I am using such as fork(). Is there a reason for this or is it nothing to worry about? Here is the exact I/O:
zeusfaber@der-dieb:~/code/spacket-cmdr$ gcc -g -O3 -Wall -o scmdrd spacket-cmdr-server.c
spacket-cmdr-server.c: In function `main’:
spacket-cmdr-server.c:66: warning: implicit declaration of function `fork’
spacket-cmdr-server.c:67: warning: implicit declaration of function `close’
spacket-cmdr-server.c:76: warning: implicit declaration of function `system’
spacket-cmdr-server.c:79: warning: implicit declaration of function `exit’
spacket-cmdr-server.c:96: warning: implicit declaration of function `inet_ntoa’
spacket-cmdr-server.c:96: warning: format argument is not a pointer (arg 3)
If you have any ideas please post!! Thanks.
6 responses so far ↓
1 Joe Williams // Jun 30, 2005 at 11:00 am
fixed!!!
i needed to add the following librarys:
unistd.h
stdlib.h
arpa/inet.h
2 Anonymous // Jul 1, 2005 at 7:31 am
Whatever. Riding bikes is for fags and five-year-olds, bro.
3 Developers « Projects 2008 // Aug 10, 2008 at 12:48 am
[...] gcc: warning messages These usually appear because of missing libraries http://www.joeandmotorboat.com/2005/06/30/gcc-error-warning-implicit-declaration-of-function/ [...]
4 C section « Projects 2008 // Sep 12, 2008 at 9:15 pm
[...] gcc: warning messages These usually appear because of missing libraries http://www.joeandmotorboat.com/2005/06/30/gcc-error-warning-implicit-declaration-of-function/ [...]
5 Gaurav // Sep 19, 2008 at 8:45 am
what about the same warning in case of kernel modules (kernel space)?
6 joe // Sep 20, 2008 at 7:56 am
I would imagine it would require the same libraries but I’m not a kernel hacking expert.
Leave a Comment