Wednesday, February 12, 2014
cocos2d-x jni problem help! ! !
In jni folder:
Andriod.mk document reads as follows:
LOCAL_PATH: = $ (call my-dir)
include $ (CLEAR_VARS)
subdirs: = $ (addprefix $ (LOCAL_PATH) / .. / .. / .. /, $ (addsuffix / Android.mk, \
Box2D \
cocos2dx \
CocosDenshion / android \
))
subdirs + = $ (LOCAL_PATH) / helloworld / Android.mk
include $ (subdirs)
Application.mk document reads as follows:
APP_STL: = stlport_static
APP_MODULES: = cocos2d box2d cocosdenshion game
In jni / helloworld folder Andriod.mk follows:
LOCAL_PATH: = $ (call my-dir)
include $ (CLEAR_VARS)
LOCAL_MODULE: = game
LOCAL_SRC_FILES: = main.cpp \
.. /.. /.. / Classes / AppDelegate.cpp \
.. /.. /.. / Classes / MainMenuScene.cpp
LOCAL_C_INCLUDES: = $ (LOCAL_PATH) / ../../../../cocos2dx \
$ (LOCAL_PATH) / ../../../../cocos2dx/platform \
$ (LOCAL_PATH) / ../../../../cocos2dx/include \
$ (LOCAL_PATH) /.. /.. /.. /.. / CocosDenshion / include \
$ (LOCAL_PATH) / ../../../Box2D \
$ (LOCAL_PATH) / .. / .. / .. \
$ (LOCAL_PATH) /.. /.. /.. / Classes
# It is used for ndk-r7
# If you build with ndk-r4, comment it
# Because the new Windows toolchain doesn't support Cygwin's drive
# Mapping (ie / cygdrive / c / instead of C :/)
LOCAL_LDLIBS: =-L $ (.... Call host-path, $ (LOCAL_PATH) / / / libs / armeabi) \
-Lcocos2d-llog-lcocosdenshion \
-Lbox2d \
-L $ (call host-path, $ (LOCAL_PATH) / ../../../../cocos2dx/platform/third_party/android/libraries)-lcurl
include $ (BUILD_SHARED_LIBRARY)
Finally eclipse error as follows:
jni / Android.mk: 11: jni/../../../Box2D/Android.mk: No such file or directory
jni / Android.mk: 11: jni/../../../cocos2dx/Android.mk: No such file or directory
jni / Android.mk: 11: jni / / / / CocosDenshion / android / Android.mk:...... No such file or directory
.. I Baidu Google a lot of blog, I try to use the h cpp files and are put Android.mk jni folder:
Compiled before starting the following content:
Gdbserver: [arm-linux-androideabi-4.4.3] libs / armeabi / gdbserver
Gdbsetup: libs / armeabi / gdb.setup
"Compile + + thumb: game <= main.cpp
jni / main.cpp: 1:25: error: AppDelegate.h: No such file or directory
jni / main.cpp: 2:21: error: cocos2d.h: No such file or directory
jni / main.cpp: 9: error: 'cocos2d' is not a namespace-name
.......
Reply:
brother like you made the wrong post it
Reply:
The same requirements, the same error.
Reply:
I solved this problem buddy, this is stored in the directory with your cocos2D about, you unzip the downloaded directly cocos2d eclipse workspace with the same directory, then OK. .
Reply:
It really is because eclipse workspace files and not in a relationship at the same level directory, thanks!
Reply:
This can be said about it in particular, the positional relationship between folders, thank
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment