'incompatible implicit declaration' errors when compiling
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
'incompatible implicit declaration' errors when compiling
I'm trying to install my ISP's billing program in Slackware 12. I've downloaded the tar.gz package, unpacked it, and when I ran _compile.sh as stated in the installation instructions I get the following:
bash-3.1# ./_compile.sh
login.hnt.c: In function 'main':
login.hnt.c:25: warning: incompatible implicit declaration of built-in function 'printf'
login.hnt.c:26: warning: incompatible implicit declaration of built-in function 'exit'
login.hnt.c:38: warning: incompatible implicit declaration of built-in function 'bzero'
login.hnt.c:44: warning: incompatible implicit declaration of built-in function 'printf'
login.hnt.c:69: warning: incompatible implicit declaration of built-in function 'printf'
login.hnt.c: In function 'md5':
login.hnt.c:109: warning: incompatible implicit declaration of built-in function 'strlen'
md5.c: In function 'md5_process':
md5.c:168: warning: incompatible implicit declaration of built-in function 'memcpy'
md5.c: In function 'md5_append':
md5.c:342: warning: incompatible implicit declaration of built-in function 'memcpy'
md5.c:356: warning: incompatible implicit declaration of built-in function 'memcpy'
I did a bit of googling and one of the possible reasons seems to be the lack of ncurses libraries on my system. I installed ncurses-5.6-i486-2. Still no go. What am I missing?
I doubt very much that this has to do with ncurses.
Start with checking the logo.hnt.c file and see if stdio.h, stdlib.h, strings.h and string.h are included in the beginning of the file (or at least before lines 25, 26, 38 and 109 respectively).
Same for md5.c (only string.h required).
PS Those are only warnings, so you should end up with an executable anyway.
I doubt very much that this has to do with ncurses.
Start with checking the logo.hnt.c file and see if stdio.h, stdlib.h, strings.h and string.h are included in the beginning of the file (or at least before lines 25, 26, 38 and 109 respectively).
Same for md5.c (only string.h required).
PS Those are only warnings, so you should end up with an executable anyway.
Thanks for your reply. You're right, the program is up and runnung. I checked login.hnt.c and there're no mention of stdio.h, stdlib.h, strings.h or string.h.
In fact I managed to install it flawlessly when I did so in a virtual machine. Now, I have Slack on my desktop, I did a custom installation and might have omitted some important packages...
The problem is I did a custom install. Perhaps, not the best thing for a newbie
Yes, there´re strings beginning with #include. Sorry, I'm new to Linux and have no idea of programming, I don't understand what these strings mean and how include files can be included through other include files.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.