LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-11-2008, 03:37 AM   #1
HarryBoy
Member
 
Registered: Apr 2008
Distribution: MontaVista Linux Version 4.0.1, Professional Edition
Posts: 215

Rep: Reputation: 16
implicit declaration of function error


When I 'make' a third party library called 'DirectFB' after using the --enable-debug option in the ./configure command I get the following error:

Code:
tslib.c:176: error: implicit declaration of function `strcmp'
line 176 is:
Code:
 if (tsdev && !strcmp( tsdev, buf ))

But whenever I 'make' without using --enable-debug option in the ./configure command it is fine.


What could be the problem.

Thanks
 
Old 09-11-2008, 05:52 AM   #2
prasad_ark
LQ Newbie
 
Registered: Jul 2008
Posts: 18
Blog Entries: 1

Rep: Reputation: 0
Try adding #include<string.h> in the .c file giving the error.
I am not sure,but the reason may be --enable-debug is causing some assertion to fail.

Thanks & regards
 
Old 09-11-2008, 06:37 AM   #3
HarryBoy
Member
 
Registered: Apr 2008
Distribution: MontaVista Linux Version 4.0.1, Professional Edition
Posts: 215

Original Poster
Rep: Reputation: 16
That did the trick Thanks buddy.
 
Old 09-11-2008, 07:29 AM   #4
kingraja84
LQ Newbie
 
Registered: Aug 2006
Location: India
Distribution: suse,mandriva
Posts: 24

Rep: Reputation: 15
Hi .... some general comments

stdout messages should be commented @ end product to customer, so they include print statements only in debug mode.

so even your coding style should be like

#if defined DEBUG_MESG
#include <stdio.h>
#include <string.h>
#endif


main()
{

/*your functionaliy */
:
:
:
#if defined DEBUG_MESG
printf(" my module is running good\n");
#endif
return 0;
}
 
  


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
warning: implicit declaration of function liguorir Linux - Software 5 10-22-2012 03:20 PM
warning: implicit declaration of function `snprintf' BiThian Programming 13 10-06-2011 04:26 PM
Compiling 2.6.23: implicit declaration of function ‘scsi_device_cancel’ fof3 Debian 4 12-10-2007 02:16 PM
error:implicit declaration of function ‘get_filesystem_list’ swift_a2002 Programming 1 05-15-2007 03:27 AM
implicit declaration of function 'getdelim' MicahCarrick Programming 2 05-02-2005 11:03 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:48 AM.

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