I\'m getting a lot of \" redefinition of x....x previously defined here\". Please what does this error means?
The error means that there is a symbol that has been defined in one place and an alternate definition has been made in another place.
This can occur if in cases like:
In this last case there will be a mismatch between the real function and the "implicit declaration" that the compiler assumes when it doesn't have a prototype to use.
These situations can be avoided by:
static
, or unique if they are used between object files)extern
statements in source files to declare prototypes. Better to use a prototype from the appropriate header file.static
functions, or in a header file if they are to be used by other object files.