NSErrorからlocalizedDescriptionを呼び出して、それをNSLog(LOGマクロ)に投げると、
ワーニングに次のような文章が出る。
LOG([NSError localizedDescription]);
format not a string literal and no format arguments
下記のようにするとwarning出ません。
LOG((@"%@",[NSError localizedDescription]);
同様に
printf(@"%",[message UTF8String]);
だとワーニングが出ますが、
printf(@"%",[message UTF8String]);
だとでませんが、今度は、
Passing arguments 1 of
というワーニングがでてきます。
プロトタイプ宣言がない!というお叱りです。 関数呼び出しの前に関数を書くか、プロトタイプ宣言を記述しましょう。
http://tech.gowest.co.jp/?p=77
iPhone SDK 3でターゲットを「Simulator – 3.0|Debug」にしてビルドすると(プロジェクト名)_Prefix.pchファイルで以下のようなエラーが出ることがある。
error: syntax error before ‘AT_NAME’ token error: syntax error before ‘}’ token fatal error: method definition not in @implementation context
原因はコンパイラーのバージョンによってiPhone OS 3.0用実行ファイルのコンパイルができないようである。 回避方法は以下の通り。
「method definition not in @implementation」とか出るんだけど意味がわかりません。