Path: chuka.playstation.co.uk!news From: Toby Hutton Newsgroups: scee.yaroze.programming.gnu_compiler Subject: Re: implicit declaration of function : warning Date: 17 Jun 1998 14:46:40 +1000 Organization: PlayStation Net Yaroze (SCEE) Lines: 44 Sender: thutton@TECH10 Message-ID: References: <01bd997e$bb9253a0$c613c8c3@musicweb.ftech.co.uk> NNTP-Posting-Host: 203.103.154.235 X-Newsreader: Gnus v5.3/Emacs 19.34 "Tim" writes: > > Hi, > I'm getting these warning's from the gnu compiler and was wondering > if anyone could tell me what they mean. > Tim. > > main.c:30: warning: implicit declaration of function `PadInit' > main.c:31: warning: implicit declaration of function `InitialiseGraphics' > main.c:33: warning: implicit declaration of function `build_viewpoint' > main.c:35: warning: implicit declaration of function `build_scene' > main.c:37: warning: implicit declaration of function `InitAllLights' > main.c:44: warning: implicit declaration of function `RenderWorld' You're not prototyping your functions properly. You're either making calls to functions that appear later in the same module (file) ie. main.c, or to functions in a different module without including a header file with the exported prototypes. So, you need to declare all your functions in order, making sure that functions that are called by other functions appear before them - callee before caller. Or, if you like to have main() up the top, put some prototypes before it. eg. int proc(int a, char b); int main() { proc(1, 'A'); return 0; } int proc(int a, char b) { // code... } Or, if these functions (PadInit, etc) are in different files, you need to make a header file with prototypes and #include it at the top of main.c -- Toby.