0

作成中のプログラムでグローバル ホットキーに DDHotKey を使用しようとしていますが、DDHotKeyCenter.m にエラーがあるため、プログラムをコンパイルできません。

エラーは以下のとおりです... エラー

DDHotKey デモは正常にコンパイルおよび実行されるため、これは私のプロジェクト設定と関係があると思います。

アークを無効にしてアークに変換しようとしましたが、どちらも成功しませんでした。

私はまだ Cocoa を使い始めたばかりなので、何が原因なのか他に考えがありません。

どんな助けでも大歓迎です。

編集:アークが無効になっているときのエラー... より多くのエラー

4

1 に答える 1

4

その通りです。これらのファイルは ARC に対応していないようです。ただし、これらのメッセージを受け取っている場合は、プロジェクトの残りの部分が次のようになっていることを意味します:)

Luckily, you can disable arc for specific files in your project.

In the build phases tab of the project settings, look at the compile sources section. Next to the files that are getting error (i.e. DDHotKeyCenter.m) add the compiler flag -fno-objc-arc - this will tell the compiler not to use ARC for this file only.

Just repeat that for each file complaining about release, retain, autorelease etc. and see how you get on.

于 2012-11-01T00:34:53.817 に答える