Compilation terminated. - Cocos2d-JS-v3.0-alpha [Solved]

Getting this error while compiling Project with platform android on Cocos2d-JS-v3.0-alpha

In file included from PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-alpha\t
ools\cocos2d-console\bin\game\frameworks\runtime-src\proj.android\../../js-bindi
ngs/cocos2d-x/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListVi
ewReader.h:28:0,
                 from PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-alpha\t
ools\cocos2d-console\bin\game\frameworks\runtime-src\proj.android\../../js-bindi
ngs/cocos2d-x/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListVi
ewReader.cpp:3:
PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-alpha\tools\cocos2d-console\b
in\game\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/ed
itor-support/cocostudio/WidgetReader/ListViewReader/../ScrollViewReader/ScrollVi
ewReader.h:28:42: fatal error: ../LayoutReader/LayoutReader.h: No such file or d
irectory
 #include "../LayoutReader/LayoutReader.h"
                                          ^
compilation terminated.

make.exe: *** [obj/local/armeabi/objs/cocostudio_static/WidgetReader/ListViewRea
der/ListViewReader.o] Error 1
make.exe: Leaving directory 'PATH/Cocos2d-JS-v3.0-alpha/Cocos2d-JS-v3.0-
alpha/tools/cocos2d-console/bin/game/frameworks/runtime-src/proj.android'
Error running command, return code: 2

Hi, @gojira

It’s a pretty odd error, can you check this file in your cocos2d-js directory?

Cocos2d-JS-v3.0-alpha/frameworks/js-bindings/cocos2d-x/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.h

If it exist try to run the compilation again, if the same message occurs please post again

Huabin

Hi @pandamicro ,
thanks for your feedsback
LayoutReader.h exist in dir "Cocos2d-JS-v3.0-alpha/frameworks/js-bindings/cocos2d-x/cocos/editor-support/cocostudio/WidgetReader/LayoutReader/"

Result : Problem Not Resolved.

FULL LOG ,COMMAND & ERROR :

PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-alpha\tools\cocos2d-console\b
in>cocos.py compile -s game -p android
Runing command: compile
Building mode: debug
building native
The Selected NDK toolchain version was 4.8 !
running: 'PATH\AppData\Local\Android\android-ndk-r9d\ndk-build -j4 -C
 PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-alpha\tools\cocos2d-console\
bin\game\frameworks\runtime-src\proj.android -j1 NDK_MODULE_PATH=PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-alpha\tools\cocos2d-console\bin\game\frameworks\runtime-src\proj.android\../../js-bindings;PATH\Cocos2d-JS-v3.0-alph
a\Cocos2d-JS-v3.0-alpha\tools\cocos2d-console\bin\game\frameworks\runtime-src\pr
oj.android\../../js-bindings/external;PATH\Cocos2d-JS-v3.0-alpha\Cocos2d
-JS-v3.0-alpha\tools\cocos2d-console\bin\game\frameworks\runtime-src\proj.androi
d\../../js-bindings/cocos2d-x;PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0
-alpha\tools\cocos2d-console\bin\game\frameworks\runtime-src\proj.android\../../
js-bindings/cocos2d-x/cocos;PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-a
lpha\tools\cocos2d-console\bin\game\frameworks\runtime-src\proj.android\../../js
-bindings/cocos2d-x/external'

Android NDK: WARNING:PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-alpha\to
ols\cocos2d-console\bin\game\frameworks\runtime-src\proj.android\../../js-bindin
gs/cocos2d-x/cocos/2d/Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored
 for static libraries
Android NDK: WARNING:PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-alpha\to
ols\cocos2d-console\bin\game\frameworks\runtime-src\proj.android\../../js-bindin
gs/cocos2d-x/cocos/2d/platform/android/Android.mk:cocos2dxandroid_static: LOCAL_
LDLIBS is always ignored for static libraries
make.exe: Entering directory `PATH/Cocos2d-JS-v3.0-alpha/Cocos2d-JS-v3.0
-alpha/tools/cocos2d-console/bin/game/frameworks/runtime-src/proj.android'
[armeabi] Compile++ thumb: cocostudio_static <= ListViewReader.cpp

In file included from PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-alpha\t
ools\cocos2d-console\bin\game\frameworks\runtime-src\proj.android\../../js-bindi
ngs/cocos2d-x/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListVi
ewReader.h:28:0,
                 from PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-alpha\t
ools\cocos2d-console\bin\game\frameworks\runtime-src\proj.android\../../js-bindi
ngs/cocos2d-x/cocos/editor-support/cocostudio/WidgetReader/ListViewReader/ListVi
ewReader.cpp:3:
PATH\Cocos2d-JS-v3.0-alpha\Cocos2d-JS-v3.0-alpha\tools\cocos2d-console\b
in\game\frameworks\runtime-src\proj.android\../../js-bindings/cocos2d-x/cocos/ed
itor-support/cocostudio/WidgetReader/ListViewReader/../ScrollViewReader/ScrollVi
ewReader.h:28:42: fatal error: ../LayoutReader/LayoutReader.h: No such file or d
irectory
 #include "../LayoutReader/LayoutReader.h"
                                          ^
compilation terminated.
make.exe: *** [obj/local/armeabi/objs/cocostudio_static/WidgetReader/ListViewRea
der/ListViewReader.o] Error 1
make.exe: Leaving directory `PATH/Cocos2d-JS-v3.0-alpha/Cocos2d-JS-v3.0-
alpha/tools/cocos2d-console/bin/game/frameworks/runtime-src/proj.android'
Error running command, return code: 2

I’ve no idea about the problem. The commands are running well on my computer.

I have a question about the log:
What’s the PATH mean in your environment? It looks like a environment variable.
I think the output in log should be absolute path, but it’s not in your log.

And there is a suggestion : Please keep the path used in cocos away from spaces. Such as project path, SDK path, NDK path and so on.

Anyway, please tell us if you solved it and how to solve it. Or if you can give me more details about your environment, I can take a try to solve it.

Thanks for your feedback! And sorry for the problem!

Hi @zhangbin,
I used Path to shorten my dir link
PATH="C:/bla/bla......"

I am using Windows 8.
Android Ndk 4.8

Sorry for Inconvenience.

FINALLY ISSUE SOLVED


I have extracted the Cocos into same dir
Problem Caused : Same Dir name
C:\a\a (!)

Sorry Members for this Silly Problem,
I am new in Game development.