Inline-Funktion "undefined Symbol" Fehler

Ich schreiben wollen, eine inline-Funktion, aber ich bekomme eine Fehlermeldung. Wie kann ich es beheben?

Fehlerinformationen:

Undefined symbols for architecture i386:
  "_XYInRect", referenced from:
      -[BeginAnimation ccTouchesEnded:withEvent:] in BeginAnimation.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Code:

CGPoint location = CGPointMake(60, 350);

if (XYInRect(location, 53, 338, 263, 369)) {

}

inline BOOL XYInRect(CGPoint location, float MixX, float MixY, float MaxX ,float MaxY){
    if (location.x >MixX && location.y >MixY && location.x <MaxX && location.y <MaxY) {
        return YES;
    } else {
        return NO;

    }
}
  • Nicht eine Antwort, aber kannst du nicht einfach verwenden, CGRectContainsPoint anstatt Ihre eigenen Rollen?
  • Kompilieren mit-O2-Optimierung-Schalter war für mich, wie vorgeschlagen, in StackOverflow.com/questions/18939482/... und eine weitere Frage kann ich nicht mehr finden.
InformationsquelleAutor user1297301 | 2012-04-20
Schreibe einen Kommentar