LinuxQuestions.org
Visit the LQ Articles and Editorials section
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, 10: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, 05:24 AM   #2
sapan
LQ Newbie
 
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
Talking

I know the answer.
 
Old 02-17-2009, 06:17 AM   #3
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian jessie/sid; OpenSuSE; Fedora
Posts: 1,593

Rep: Reputation: 162Reputation: 162
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, 08: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 12:36 PM.
 
Old 05-05-2012, 01: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, 04: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:20 AM
warning: incompatible implicit declaration of built-in function ‘exit’ xzotech Programming 1 08-14-2005 06:43 AM
implicit declaration of function 'getdelim' MicahCarrick Programming 2 05-02-2005 12:03 PM
gcc 3.4.1 and c implicit declaration foo_bar_foo Programming 1 01-27-2005 05:49 PM
Implicit typename warning (gcc 3.3.4) ta0kira Programming 1 10-12-2004 04:45 AM


All times are GMT -5. The time now is 10:37 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration