title: Android NDK - no type named 'function' in namespace 'std'
body: <p>I keep getting the following error in the Android NDK when building with Cocos-2dx and Clang</p>
  
  <pre><code>jni/../../Classes/Facebook/FacebookConstants.h:44:14: error: no type named 'function' in namespace 'std'
  typedef std::function&lt;void()&gt; FacebookLoginCallback;
  </code></pre>
  
  <p>TApplication.mk</p>
  
  <pre><code>NDK_TOOLCHAIN_VERSION := clang
  APP_STL := gnustl_static
  APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -DCOCOS2D_DEBUG=1
  </code></pre>
  
  <p>Android.mk</p>
  
  <pre><code>LOCAL_CFLAGS :=-D__GXX_EXPERIMENTAL_CXX0X__
  LOCAL_CPPFLAGS  := -std=c++11
  LOCAL_CFLAGS += -std=gnu++11
  LOCAL_PATH := $(call my-dir)
  
  include $(CLEAR_VARS)
  
  LOCAL_MODULE := game_shared
  
  LOCAL_MODULE_FILENAME := libgame
  
  LOCAL_SRC_FILES := hellocpp/main.cpp \
                     ../../Classes/AppDelegate.cpp \
                     ../../Classes/Facebook/Request.cpp \
                     ../../Classes/FriendListCell.cpp \
                     ../../Classes/Game.cpp \
                     ../../Classes/GameListCell.cpp \
                     ../../Classes/GameListHeaderCell.cpp \
                     ../../Classes/GameScene.cpp \
                     ../../Classes/LoginScene.cpp \
                     ../../Classes/MenuScene.cpp \
                     ../../Classes/NewGameScene.cpp \
                     ../../Classes/Parse/curl/docs/examples/asiohiper.cpp \
                     ../../Classes/Parse/curl/docs/examples/htmltitle.cpp \
                     ../../Classes/Parse/HTTP.cpp \
                     ../../Classes/Parse/lib_json/json_reader.cpp \
                     ../../Classes/Parse/lib_json/json_value.cpp \
                     ../../Classes/Parse/lib_json/json_writer.cpp \
                     ../../Classes/Parse/ParseHTTP.cpp \
  
  LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../Classes \
                        $(LOCAL_PATH)/../../Classes/Parse \
                        $(LOCAL_PATH)/../../Classes/Parse/json \
                        $(LOCAL_PATH)/../../Classes/Parse/lib_json \
                        $(LOCAL_PATH)/../../Classes/Facebook \
  
  LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static
  
  include $(BUILD_SHARED_LIBRARY)
  
  $(call import-module,CocosDenshion/android) \
  $(call import-module,cocos2dx) \
  $(call import-module,extensions)
  </code></pre>