implicit declaration of static attribute for functions????

Jerry Miller gmiller@cs.sunysb.edu
Wed Mar 28 11:05:00 GMT 2001


In making enhancements to a very large project,
I found it necessary to make use of a function
that had been short-sightedly made static, and
thus local to the module containing it.  I removed
the static attribute from both the prototype
declaration and the function itself.

I recompiled and relinked, but I got a message
from the linker that the reference was unresolved.
Noting that the function in question was at the
very end of the module, following several static
functions, on a hunch, I cut and pasted to the
very beginning of the module, which solved the
problem!

Why should this be necessary???



More information about the Gcc-help mailing list