OS X 10.8でXCode 4.5.1を使ってサンプルコード「SonofGrab」をコンパイルしようとしています。
controller.m で 1 つの関数が次のように定義されています。
inline uint32_t ChangeBits(uint32_t currentBits, uint32_t flagsToChange, BOOL setFlags);
これにより、次のエラー メッセージが表示されます。
Undefined symbols for architecture x86_64:
"_ChangeBits", referenced from:
-[Controller awakeFromNib] in Controller.o
[...]
ld: symbol(s) not found for architecture x86_64
関数 ChangeBits のインライン化を削除すると問題は解決しますが、リンカが元の定義の Changebits を見つけられないのはなぜですか?