Function funcname exported but not declared in header file

From 433253

Revision as of 05:44, 15 August 2006 by Duanewl (Talk | contribs)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)

This error means that you've declared a function without specifying that it's purely a local function, and you haven't provided the prototype in a header file. If you're planning to make the function available to other modules, you should put it's prototype in the header file, otherwise, you should add the static keyword in front of the function prototype (or function definition if it has no prototype). i.e:

static void func(int arg);
void
func(int arg) {
    /* do stuff */
}













 

Personal tools