LinuxQuestions.org
Help answer threads with 0 replies.
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 05-01-2005, 09:57 PM   #1
MicahCarrick
Member
 
Registered: Jul 2004
Distribution: Fedora
Posts: 241

Rep: Reputation: 31
implicit declaration of function 'getdelim'


I'm relatively new to this so bear with me...

Although the code executes fine, I'm getting a
Code:
warning: implicit declaration of function 'getdelim'
message from the compiler. Why is this?

This is a GTK+/Gnome program and I'm using getdelim() function to read the output of a command I'm executing using popen.

Thanks.
 
Old 05-02-2005, 12:28 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Did you check the man page?
Code:
SYNOPSIS
       #define _GNU_SOURCE
       #include <stdio.h>

       ssize_t getline(char **lineptr, size_t *n, FILE *stream);
       ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream);
You need both "#define _GNU_SOURCE" and "#include <stdio.h>" in the file using getdelim(). If you have both and still get the error, then something funky is going on; a weird layout of header and implementation files in the project perhaps.
 
Old 05-02-2005, 11:03 AM   #3
MicahCarrick
Member
 
Registered: Jul 2004
Distribution: Fedora
Posts: 241

Original Poster
Rep: Reputation: 31
I would think those would be covered with my #include <gnome.h>

However, even if I put them in my code I still get the warning... so I guess this is going to be harder than I thought. Since I'm using Anjuta, I'll have to wait until I'm ready to embark on the getting to know my project files intimately-- which I'm not ready for yet

Thanks for your suggestions.
 
  


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
warning: implicit declaration of function liguorir Linux - Software 5 10-22-2012 03:20 PM
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
gcc 3.4.1 and c implicit declaration foo_bar_foo Programming 1 01-27-2005 04:49 PM
Problem with function declaration Linh Programming 3 04-26-2004 04:58 PM

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

All times are GMT -5. The time now is 10:44 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