Error build in android

when I try to build a project base on helloworld ,the error accur:

* Build of configuration Default for project HelloCpp*

bash /Users/season/cocos2d-x/projects/MyTest/proj.android/build_native.sh
NDK_ROOT = /Users/season/android-ndk-r8e
COCOS2DX_ROOT = /Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…
APP_ROOT = /Users/season/cocos2d-x/projects/MyTest/proj.android/…
APP_ANDROID_ROOT = /Users/season/cocos2d-x/projects/MyTest/proj.android
Using prebuilt externals
make: Entering directory `/Users/season/cocos2d-x/projects/MyTest/proj.android’
Compile*+ thumb : cocos2dcpp_shared <= main.cpp
In file included from /Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionGrid.h:29:0,
from /Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionGrid3D.h:28,
from /Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionPageTurn3D.h:28,
from /Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/include/cocos2d.h:45,
from jni/…/…/Classes/AppDelegate.h:4,
from jni/hellocpp/main.cpp:1:
/Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionInstant.h:224:38: error: ‘function’ in namespace ‘std’ does not name a type
/Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionInstant.h:224:43: error: ISO C*+ forbids declaration of ‘parameter’ with no type [-fpermissive]
/Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionInstant.h:224:51: error: expected ‘,’ or ‘…’ before ‘<’ token
/Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionInstant.h:234:22: error: ‘static cocos2d::CCCallFunc* cocos2d::CCCallFunc::create(int)’ cannot be overloaded
/Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionInstant.h:224:25: error: with ‘static cocos2d::CCCallFunc* cocos2d::CCCallFunc::create(int)’
/Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionInstant.h:244:41: error: ‘function’ in namespace ‘std’ does not name a type
/Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionInstant.h:244:46: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
/Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionInstant.h:244:54: error: expected ‘,’ or ‘…’ before ‘<’ token
/Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionInstant.h:283:2: error: ‘function’ in namespace ‘std’ does not name a type
/Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionInstant.h: In constructor ‘cocos2d::CCCallFunc::CCCallFunc()’:
/Users/season/cocos2d-x/projects/MyTest/proj.android/…/…/…/cocos2dx/actions/CCActionInstant.h:216:5: error: class ‘cocos2d::CCCallFunc’ does not have any field named ‘_function’
make: Leaving directory `/Users/season/cocos2d-x/projects/MyTest/proj.android’
make: * Error 1
* Build Finished*

can anyone help me to solove this problem?

Do you use Eclipse to build the project? Have you added the include directories to the search paths in project properties?

Maybe you should use vs first.

I have use the search paths,and has the same problem in the xcode!

Pawel Lopusinski wrote:

Do you use Eclipse to build the project? Have you added the include directories to the search paths in project properties?

Fix you project settings: enable c11 for both android and iOS.
* In XCode, find “C*+ standard version" and "C*+ library” .
* In android, add LOCAL_CPPFLAGS += -std=gnu++0x to your Application.mk or Android.mk.
P.S. C
2011 mode was turned in develop branch a few days ago, but maybe some cases was missed. Tell me please how and when did you created projects for XCode and android?

r u using Mac ?
I got errors to compile create-android-project.sh or build_native.sh if I use NDK r8e in Mac OS X.
Try to download and use NDK r8.

Thank you,I think the error int the NDK,too.

KS Lam wrote:

r u using Mac ?
I got errors to compile create-android-project.sh or build_native.sh if I use NDK r8e in Mac OS X.
Try to download and use NDK r8.

I’ve tried,but it did not work.

Sergey Shambir wrote:

Fix you project settings: enable c11 for both android and iOS.
* In XCode, find “C*+ standard version" and "C*+ library” .
* In android, add LOCAL_CPPFLAGS += -std=gnu++0x to your Application.mk or Android.mk.
>
P.S. C
2011 mode was turned in develop branch a few days ago, but maybe some cases was missed. Tell me please how and when did you created projects for XCode and android?

Thank you all, I’ve solve the problem, the error is that I
use the cocos2d-x develop branch in the gihub,when i switch
it to the master brach, the program runs OK.

season lee wrote:

can anyone help me to solove this problem?