1

私の cocos2d iOS ゲーム コードは、Xcode 4.6.2 でエラーなくコンパイルおよび実行されますが、適切な読み込みは「ファイルの末尾に改行がありません」というエラーで停止します。例えば:

/Users/james/.apportable/SDK/System/dispatch/dispatch.h:28:sysroot/common/usr/include/stdint.h:42:7: エラー: ファイルの末尾に改行がありません [- Werror,-Wnewline-eof]#endif

4

2 に答える 2

0

「.approj」フォルダーの「configuration.json」に移動して、セクションを見つけることで、Apportable が使用するパラメーターをいじることができます。

// Edit this section to add and replace files and parameters to the generated settings for this project.
// If the generated settings for a particular file are incorrect, simply add it here with the settings
// you need and the final build parameters will only included the version specified here.
"add_params": {

このように、「フラグ」配列に必要なフラグを追加します

// A list of global compile flags for the project.
// Flags can be either a string, e.g. "-Werror-shadow",
// or a dictionary specifying the flag and the environment
// that it should be used in, e.g.,
// {"flag": "-fstack-protector", "env": {"TARGET_OS": "android"}}
"flags": [ "-Wno-four-char-constants", "-Wno-conversion", "-Wno-gnu", "-Wno-pedantic", "-Wno-selector", "-Wno-sign-conversion" ],

この特定のエラーには、「-Wno-newline-eof」が適切です。

于 2014-05-13T20:50:57.087 に答える