RAD Studio |  |

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

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:

Copy Code

    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:

Copy Code

    myex();

Copy Code

    inline myex() { return 2; }

Copy Code

    twoex() { myex(); }

or better:

Copy Code

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

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!