Objective-C iOS应用程序 - 未找到符号

Fel*_*ros 0 iphone objective-c ios4

这是我的代码:

- (double)performOperation:(NSString *)operation {
    if([operation isEqual:@"sqrt"])
        operand = srqt(operand);
    return operand;
}
Run Code Online (Sandbox Code Playgroud)

这是阻止我的应用程序运行的错误

Undefined symbols:
  "_srqt", referenced from:
      -[CalculatorBrain performOperation:] in CalculatorBrain.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)

Heeeelp!:d

Jam*_*ers 5

if([operation isEqual:@"sqrt"])
    operand = srqt(operand);
Run Code Online (Sandbox Code Playgroud)

请注意,您sqrt在第二行中拼错了该函数.也就是说,除非你已经定义了自己的srqt功能.但根据链接器错误,似乎你没有.


See*_*ega 5

哟写道operand = srqt(operand);但是意味着operand = sqrt(operand);