In my case, I got this while overloading
ostream & operator << (ostream &out, const MyClass &obj)
and forgot to return out
. In other systems this just generates a warning, but on macos it also generated an error (although it seems to print correctly).
The error was resolved by adding the correct return value. In my case, adding the -mmacosx-version-min
flag had no effect.