0

I'm using NDK-r9d and trying to integrate C++ Google Play Game (GPG) Services to my sample native-activity project. Now native-activity (sample from NDK ) compiles perfectly and runs fine on my android phone.

But when I add GPG using this code

gpg::AndroidPlatformConfiguration platform_configuration;
platform_configuration.SetActivity(state->activity->clazz);

I got error

"Symbol 'function' could not be resolved" at achievement_manager.h  /HelloJni/modules/gpg-cpp-sdk/android/include/gpg   line 54 Semantic Error

I've added includes to STL and everything needed from this link Eclipse indexer errors when using STL with Android NDK with no success.

This is my Android.mk

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := hello-jni
LOCAL_SRC_FILES := hello-jni.cpp


LOCAL_STATIC_LIBRARIES := android_native_app_glue libgpg-1
LOCAL_LDLIBS    := -llog -landroid -lEGL -lGLESv1_CM
LOCAL_CFLAGS := -std=c++11

include $(BUILD_SHARED_LIBRARY)

$(call import-add-path,$(LOCAL_PATH)/../modules)
$(call import-module,gpg-cpp-sdk/android)
$(call import-module,android/native_app_glue)

And this is my Application.mk

APP_PLATFORM := android-10
APP_ABI := armeabi-v7a
APP_STL := c++_static

Any suggestions?

Community
  • 1
  • 1
  • Please show us more code, what is line 54? "Symbol 'function' could not be resolved" at achievement_manager.h /HelloJni/modules/gpg-cpp-sdk/android/include/gpg line 54 – John Oct 17 '14 at 08:40

1 Answers1

1

I had some problems with compiling gpg sources until I specified the toolchain in Application.mk like this:

NDK_TOOLCHAIN_VERSION := 4.8

Note that I am on SDK 19, google play services 21, and NDK r9d.

Bram
  • 7,440
  • 3
  • 52
  • 94