Inline function "undefined symbols" error Inline function "undefined symbols" error objective-c objective-c

Inline function "undefined symbols" error


Clang defaults to C99 and not GNU sematics, which means a raw inline is different from both static inline and extern inline.

In particular, a raw inline means that the function still has external linkage, but the inline definition does not provide the external one (you'd need extern inline for that).

What this means is that you need an additional extern definition in a different translation unit or linking will fail. However, you're probably looking for static inline.


I think XYInRect() needs to be known prior to being used. Move the function definition to some place in the file before you call it.