LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 06-02-2005, 09:42 AM   #1
liguorir
Member
 
Registered: May 2003
Posts: 256

Rep: Reputation: 30
warning: implicit declaration of function


How do I get rid of these messages:

warning: implicit declaration of function [function]
 
Old 02-17-2009, 04:24 AM   #2
sapan
LQ Newbie
 
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
Talking

I know the answer.
 
Old 02-17-2009, 05:17 AM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
That sounds like a compiler message. If the compile stops right after that, you probably need to install some header files. It's pretty tough to know what's going on with one line from the CC ouput. Usually you would look in config.log for a file that configure is unable to locate.
 
Old 02-18-2009, 07:23 PM   #4
servat78
Member
 
Registered: Jan 2009
Posts: 100

Rep: Reputation: 17
It seems that your header files have no prototype declared for some of the functions, so the function itself is implicitly treated as the function prototype. It's actually only a warning, and depending on your compilation flags it should compile even so, so it's no reason to panic. Then again, it shouldn't be a big task to add the prototype to one of your headers or at least add on top of the same source file.

Debian

Last edited by servat78; 02-19-2009 at 11:36 AM.
 
Old 05-05-2012, 12:02 PM   #5
preusstang
LQ Newbie
 
Registered: May 2012
Posts: 1

Rep: Reputation: Disabled
Thank You!

Quote:
Originally Posted by servat78 View Post
It seems that your header files have no prototype declared for some of the functions, so the function itself is implicitly treated as the function prototype. It's actually only a warning, and depending on your compilation flags it should compile even so, so it's no reason to panic. Then again, it shouldn't be a big task to add the prototype to one of your headers or at least add on top of the same source file.
sorry for the necropost, but you just helped me out a great deal! As [part of] a lab for my net security class we are building and using the exploit3.c and exploit4.c files from Aleph One's "Smashing The Stack For Fun And Profit." and were required to get rid of ALL compiler warnings when using the -Wall option.

evidently, stdlib.h doesn't specify prototypes for the contained functions, at least not for putenv() or getenv(). So if you want to get rid of the implicit function declaration warnings, add the prototypes to your source files. this may help someone else in the future
 
Old 10-22-2012, 03:20 PM   #6
alex440
LQ Newbie
 
Registered: Oct 2012
Posts: 1

Rep: Reputation: Disabled
Quote:
So if you want to get rid of the implicit function declaration warnings, add the prototypes to your source files.
wonderful.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Implicit declaration means alaios Programming 7 03-09-2009 06:20 AM
warning: incompatible implicit declaration of built-in function ‘exit’ xzotech Programming 1 08-14-2005 05:43 AM
implicit declaration of function 'getdelim' MicahCarrick Programming 2 05-02-2005 11:03 AM
gcc 3.4.1 and c implicit declaration foo_bar_foo Programming 1 01-27-2005 04:49 PM
Implicit typename warning (gcc 3.3.4) ta0kira Programming 1 10-12-2004 03:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration