0
我越來越想用C的math.h
庫時,出現以下錯誤:iOS的數學:未定義的符號FR架構ARM7
#import <Foundation/Foundation.h>
#import <math.h>
@interface Filter : NSObject {
float cutoff;
float resonance;
float sampleRate;
float *f;
float freq;
float damp;
}
- (float)filter:(float)input;
@end
你能告訴我怎樣才能解決這個問題?看起來min()
函數不能被編譯爲armv7架構。
Undefined symbols for architecture armv7:
"_min", referenced from:
-[Filter init] in Filter.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
其中是代碼中的min()?並且你不需要導入'math.h' –
http://www.cplusplus.com/reference/cmath/ - 似乎不包含任何min(),但只有fmin() –
感謝Anoop和alex,你都是對的。我已經刪除了math.h的導入,並且使用了fmin。現在工作一切正常。 – ndrizza