3

cocos2d フレームワークを使用してモバイル ゲームを作成します。問題は、ios プラットフォームをコンパイルしようとすると、このエラーが発生することです。

In file included from /Users/MNurdin/Documents/Game/WTP/frameworks/js-bindings/bindings/manual/chipmunk/js_bindings_chipmunk_manual.cpp:26:
In file included from /Users/MNurdin/Documents/Game/WTP/frameworks/js-bindings/bindings/proj.ios_mac/../../cocos2d-x/extensions/cocos-ext.h:16:
In file included from /Users/MNurdin/Documents/Game/WTP/frameworks/js-bindings/bindings/proj.ios_mac/../../cocos2d-x/extensions/assets-manager/AssetsManager.h:32:
/Users/MNurdin/Documents/Game/WTP/frameworks/js-bindings/bindings/proj.ios_mac/../../cocos2d-x/extensions/assets-manager/Manifest.h:36:10: fatal error: 'json/document.h' file not found
#include "json/document.h"

このチュートリアルを AZ から正確に実行します。ターミナルでこのコマンドを実行して、プロジェクトをコンパイルします。

cocos compile -p ios

参考:http ://cocos2d-x.org/docs/manual/framework/html5/v2/cocos-console/en

4

2 に答える 2

2

これは、github のソース コードを使用している場合にのみ問題になります。github からプロジェクトを取得したときに必要な追加の手順が不足していると思います。

ReadMe には次のように書かれています。

Github ノート

github リポジトリをフォークするか、github からパッケージをダウンロードする場合は、追加のタスクを実行する必要があります。

  • 実行frameworks/js-bindings/cocos2d-x/download-deps.pyして、Cocos2d-x の外部依存関係をダウンロードします
  • 実行tools/cocos2d-console/download-bin.pyして、Google Closure Compiler や JSC Compiler などの cocos2d-console プラグインの bin ファイルをダウンロードします。
于 2014-09-17T05:18:00.317 に答える