I’m trying to integrate Google Play Games Services for C++ and I’m getting this output from build server:
Description Resource Path Location Type
Build server output: javac -source 1.6 -target 1.6 -classpath /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//ext/share/java/android-support-v4.jar:/var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//ext/share/java/android.jar:/tmp/job6834724248307980917/build/tmped21d7bc-e57d-41a6-a3ff-48a455df0a5drjava/classes -d /tmp/job6834724248307980917/build/tmped21d7bc-e57d-41a6-a3ff-48a455df0a5drjava/classes @/tmp/job6834724248307980917/build/tmped21d7bc-e57d-41a6-a3ff-48a455df0a5drjava/sources.txt
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning
jar cf /tmp/job6834724248307980917/build/tmped21d7bc-e57d-41a6-a3ff-48a455df0a5drjava/R.jar -C /tmp/job6834724248307980917/build/tmped21d7bc-e57d-41a6-a3ff-48a455df0a5drjava/classes .
dx --dex --output /tmp/job6834724248307980917/build/classes.dex /tmp/job6834724248307980917/build/tmped21d7bc-e57d-41a6-a3ff-48a455df0a5drjava/R.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//ext/share/java/facebooksdk.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//ext/share/java/bolts-android-1.2.0.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//ext/share/java/google-play-services.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//ext/share/java/android-support-v4.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//ext/share/java/in-app-purchasing-2.0.61.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//share/java/glfw_android.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//share/java/facebook_android.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//share/java/gamesys_android.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//share/java/iap_android.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//share/java/push_android.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//share/java/adtruth_android.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//share/java/sound_android.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//share/java/webview_android.jar /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//share/java/iac_android.jar
arm-linux-androideabi-g++ -c -g -gdwarf-2 -fpic -ffunction-sections -fstack-protector -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -fno-exceptions -funwind-tables --sysroot=/opt/android/android-ndk-r10e/platforms/android-14/arch-arm -DANDROID -Wa,--noexecstack -DDM_PLATFORM_ANDROID -DLUA_BYTECODE_ENABLE -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -std=c++11 -Iupload/gpgservices/include/ -I/var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//include -I/var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//sdk/include -I/opt/android/android-ndk-r10e/sources/android/native_app_glue -I/opt/android/android-ndk-r10e/sources/android/cpufeatures -I/opt/android/tmp/android-ndk-r10e/platforms/android-14/arch-arm/usr/include -I/opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include -I/opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include upload/gpgservices/src/gpgservices_test.cpp -obuild/gpgservices_test.cpp_0.o
arm-linux-androideabi-g++ -c -g -gdwarf-2 -fpic -ffunction-sections -fstack-protector -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -fno-exceptions -funwind-tables --sysroot=/opt/android/android-ndk-r10e/platforms/android-14/arch-arm -DANDROID -Wa,--noexecstack -DDM_PLATFORM_ANDROID -DLUA_BYTECODE_ENABLE -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -std=c++11 -Iupload/gpgservices/include/ -I/var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//include -I/var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//sdk/include -I/opt/android/android-ndk-r10e/sources/android/native_app_glue -I/opt/android/android-ndk-r10e/sources/android/cpufeatures -I/opt/android/tmp/android-ndk-r10e/platforms/android-14/arch-arm/usr/include -I/opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include -I/opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include upload/gpgservices/src/gpgservices.cpp -obuild/gpgservices.cpp_1.o
In file included from /var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//include/dmsdk/sdk.h:11:0,
from upload/gpgservices/src/gpgservices.cpp:7:
/var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//include/dmsdk/dlib/log.h:109:2: warning: #warning "DLIB_LOG_DOMAIN is not defined" [-Wcpp]
#warning "DLIB_LOG_DOMAIN is not defined"
^
arm-linux-androideabi-ar rcs /tmp/job6834724248307980917/build/lib8c82c4dd-48cc-4c8d-a6a3-700c1fff87d0.a build/gpgservices_test.cpp_0.o build/gpgservices.cpp_1.o
arm-linux-androideabi-g++ -c -g -gdwarf-2 -fpic -ffunction-sections -fstack-protector -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -fno-exceptions -funwind-tables --sysroot=/opt/android/android-ndk-r10e/platforms/android-14/arch-arm -DANDROID -Wa,--noexecstack -DDM_PLATFORM_ANDROID -DLUA_BYTECODE_ENABLE -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -std=c++11 -I/var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//include -I/var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//sdk/include -I/opt/android/android-ndk-r10e/sources/android/native_app_glue -I/opt/android/android-ndk-r10e/sources/android/cpufeatures -I/opt/android/tmp/android-ndk-r10e/platforms/android-14/arch-arm/usr/include -I/opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/include -I/opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include build/main.cpp -obuild/main_tmpb6eb97de-ad47-4e10-a682-a8164096cc28.o
arm-linux-androideabi-g++ --sysroot=/opt/android/android-ndk-r10e/platforms/android-14/arch-arm -lEGL -lGLESv1_CM -lGLESv2 build/main_tmpb6eb97de-ad47-4e10-a682-a8164096cc28.o -o build/libdmengine.so -Wl,-soname=libdmengine.so -DDM_PLATFORM_ANDROID -DLUA_BYTECODE_ENABLE -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,-z,noexecstack -landroid -fpic -z text -L/tmp/job6834724248307980917/build -L/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android -Wl,-Bstatic -Wl,--start-group -l8c82c4dd-48cc-4c8d-a6a3-700c1fff87d0 -lgpg -Wl,--end-group -L/var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//lib/armv7-android -L/var/extender/sdk/d1aad61476af35638fb6201574c7cc9869733aa6/defoldsdk//ext/lib/armv7-android -L/opt/android/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a -Wl,-Bstatic -lengine -lwebviewext -ladtruthext -lprofilerext -lfacebookext -liapext -lpushext -liacext -lrecord_null -lgameobject -lddf -lresource -lgamesys -lgraphics -lphysics -lBulletDynamics -lBulletCollision -lLinearMath -lBox2D -lrender -lscript -lluajit-5.1 -lextension -lhid -linput -lparticle -lrig -ldlib -ldmglfw -lgui -ltracking -lcrashext -lsound -lopenal_soft -ltremolo -lliveupdate -Wl,-Bdynamic -lOpenSLES -lgnustl_static -lm -llog -lc -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -shared
upload/gpgservices/src/gpgservices.cpp:52: error: undefined reference to 'gpg::GameServices::Builder::SetOnAuthActionStarted(std::function<void (gpg::AuthOperation)>)'
upload/gpgservices/src/gpgservices.cpp:59: error: undefined reference to 'gpg::GameServices::Builder::SetOnAuthActionFinished(std::function<void (gpg::AuthOperation, gpg::AuthStatus)>)'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:all.cc:function gpg::Achievement::Achievement(std::__1::shared_ptr<gpg::AchievementImpl const>): error: undefined reference to 'std::__1::__shared_weak_count::__add_shared()'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:all.cc:function gpg::Achievement::Achievement(gpg::Achievement const&): error: undefined reference to 'std::__1::__shared_weak_count::__add_shared()'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:all.cc:function std::__1::shared_ptr<gpg::AchievementImpl const>::~shared_ptr(): error: undefined reference to 'std::__1::__shared_weak_count::__release_shared()'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:all.cc:function gpg::Achievement::operator=(gpg::Achievement const&): error: undefined reference to 'std::__1::__shared_weak_count::__add_shared()'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:all.cc:function std::__1::__function::__func<gpg::InternalCallback<gpg::AchievementManager::FetchResponse const&> gpg::InternalizeBlockingRefHelper<gpg::AchievementManager::FetchResponse>(gpg::BlockingHelper<gpg::AchievementManager::FetchResponse>)::{lambda(gpg::AchievementManager::FetchResponse const&)#1}, std::__1::allocator<{lambda(gpg::AchievementManager::FetchResponse const&)#1}>, void (gpg::AchievementManager::FetchResponse const&)>::operator()(gpg::AchievementManager::FetchResponse const&): error: undefined reference to 'std::__1::mutex::lock()'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:all.cc:function std::__1::__function::__func<gpg::InternalCallback<gpg::AchievementManager::FetchResponse const&> gpg::InternalizeBlockingRefHelper<gpg::AchievementManager::FetchResponse>(gpg::BlockingHelper<gpg::AchievementManager::FetchResponse>)::{lambda(gpg::AchievementManager::FetchResponse const&)#1}, std::__1::allocator<{lambda(gpg::AchievementManager::FetchResponse const&)#1}>, void (gpg::AchievementManager::FetchResponse const&)>::operator()(gpg::AchievementManager::FetchResponse const&): error: undefined reference to 'std::__1::condition_variable::notify_all()'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:all.cc:function std::__1::__function::__func<gpg::InternalCallback<gpg::AchievementManager::FetchResponse const&> gpg::InternalizeBlockingRefHelper<gpg::AchievementManager::FetchResponse>(gpg::BlockingHelper<gpg::AchievementManager::FetchResponse>)::{lambda(gpg::AchievementManager::FetchResponse const&)#1}, std::__1::allocator<{lambda(gpg::AchievementManager::FetchResponse const&)#1}>, void (gpg::AchievementManager::FetchResponse const&)>::operator()(gpg::AchievementManager::FetchResponse const&): error: undefined reference to 'std::__1::mutex::unlock()'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:all.cc:function std::__1::__function::__func<gpg::InternalCallback<gpg::AchievementManager::FetchResponse const&> gpg::InternalizeBlockingRefHelper<gpg::AchievementManager::FetchResponse>(gpg::BlockingHelper<gpg::AchievementManager::FetchResponse>)::{lambda(gpg::AchievementManager::FetchResponse const&)#1}, std::__1::allocator<{lambda(gpg::AchievementManager::FetchResponse const&)#1}>, void (gpg::AchievementManager::FetchResponse const&)>::operator()(gpg::AchievementManager::FetchResponse const&): error: undefined reference to 'std::__1::mutex::unlock()'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:all.cc:function std::__1::__function::__func<gpg::InternalCallback<gpg::UIStatus const&> gpg::InternalizeBlockingRefHelper<gpg::UIStatus>(gpg::BlockingHelper<gpg::UIStatus>)::{lambda(gpg::UIStatus const&)#1}, std::__1::allocator<{lambda(gpg::UIStatus const&)#1}>, void (gpg::UIStatus const&)>::operator()(gpg::UIStatus const&): error: undefined reference to 'std::__1::mutex::lock()'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:all.cc:function std::__1::__function::__func<gpg::InternalCallback<gpg::UIStatus const&> gpg::InternalizeBlockingRefHelper<gpg::UIStatus>(gpg::BlockingHelper<gpg::UIStatus>)::{lambda(gpg::UIStatus const&)#1}, std::__1::allocator<{lambda(gpg::UIStatus const&)#1}>, void (gpg::UIStatus const&)>::operator()(gpg::UIStatus const&): error: undefined reference to 'std::__1::condition_variable::notify_all()'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:all.cc:function std::__1::__function::__func<gpg::InternalCallback<gpg::UIStatus const&> gpg::InternalizeBlockingRefHelper<gpg::UIStatus>(gpg::BlockingHelper<gpg::UIStatus>)::{lambda(gpg::UIStatus const&)#1}, std::__1::allocator<{lambda(gpg::UIStatus const&)#1}>, void (gpg::UIStatus const&)>::operator()(gpg::UIStatus const&): error: undefined reference to 'std::__1::mutex::unlock()'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:achievement_manager.cc:function std::__1::__basic_string_common<true>::__throw_length_error() const [clone .isra.15]: error: undefined reference to 'std::logic_error::logic_error(char const*)'
/tmp/job6834724248307980917/upload/gpgservices/lib/armv7-android/libgpg.a:md5_util.cc:function std::__1::__basic_string_common<true>::__throw_length_error() const [clone .isra.15]: error: undefined reference to 'std::logic_error::logic_error(char const*)'
And so on ...
Contents of ext.manifest:
name: "GPGServices"
platforms:
armv7-android:
context:
flags: ["-std=c++11"]
Code I’m trying to run:
#define LIB_NAME "GPGServices"
#define MODULE_NAME "gpgservices"
#include <dmsdk/sdk.h>
#include <jni.h>
#include "gpg/android_initialization.h"
#include "gpg/android_platform_configuration.h"
#include "gpg/builder.h"
#include "gpg/game_services.h"
bool is_auth_in_progress_ = false;
std::unique_ptr<gpg::GameServices> game_services_;
static int Init(lua_State* L)
{
gpg::AndroidPlatformConfiguration platform_configuration;
gpg::GameServices::Builder::OnAuthActionStartedCallback started_callback;
gpg::GameServices::Builder::OnAuthActionFinishedCallback finished_callback;
game_services_ = gpg::GameServices::Builder()
.SetDefaultOnLog(gpg::LogLevel::VERBOSE)
.SetOnAuthActionStarted([started_callback](gpg::AuthOperation op) {
is_auth_in_progress_ = true;
})
.SetOnAuthActionFinished([finished_callback](gpg::AuthOperation op,
gpg::AuthStatus status) {
printf("Sign in finished with a result of %d \n", status);
is_auth_in_progress_ = false;
})
.Create(platform_configuration);
return 1;
}
static const luaL_reg Module_methods[] =
{
{"init", Init},
{0, 0}
};
static void LuaInit(lua_State* L)
{
int top = lua_gettop(L);
// Register lua names
luaL_register(L, MODULE_NAME, Module_methods);
lua_pop(L, 1);
assert(top == lua_gettop(L));
}
dmExtension::Result AppInitializeGPGServices(dmExtension::AppParams* params)
{
return dmExtension::RESULT_OK;
}
dmExtension::Result InitializeGPGServices(dmExtension::Params* params)
{
// Init Lua
LuaInit(params->m_L);
printf("Registered %s Extension\n", MODULE_NAME);
return dmExtension::RESULT_OK;
}
dmExtension::Result AppFinalizeGPGServices(dmExtension::AppParams* params)
{
return dmExtension::RESULT_OK;
}
dmExtension::Result FinalizeGPGServices(dmExtension::Params* params)
{
return dmExtension::RESULT_OK;
}
// Defold SDK uses a macro for setting up extension entry points:
//
// DM_DECLARE_EXTENSION(symbol, name, app_init, app_final, init, update, on_event, final)
DM_DECLARE_EXTENSION(GPGServices, LIB_NAME, AppInitializeGPGServices, AppFinalizeGPGServices, InitializeGPGServices, 0, 0, FinalizeGPGServices)
So, does anybody know what is happening?