E2212 Function defined inline after use as extern (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

Functions can't become inline after they have already been used.

Either move the inline definition forward in the file or delete it entirely.

The compiler encountered something like:

myex();
twoex() { myex(); }
inline myex() { return 2; } // error

and already used the function as an extern before it saw that it was specified as inline. This would be correct:

myex();
inline myex() { return 2; }
twoex() { myex(); }

or better:

inline myex();
inline myex() { return 2; }
twoex() { myex(); }