Should you have to include a header file into its own library? I can't understand why I sometimes, but not always, get compile errors because it's not getting the header file prototypes before it compiles the libraries.
Name:
Anonymous2007-06-27 6:28 ID:IRsSvb/I
This compiles with no warnings (-Wall -W etc.)
#include <stdio.h>
void x();
extern void x();
int main()
{
x();
return 0;
}
void x() {
puts("Tada!");
}
You want "void somefunc();" in your *.h files, and "extern void somefunc();" in your *.c files, and in the latter case, you usually won't even need it.