[SDKBOX] sdkbox::PluginGPG::gpg() result is null

[SDKBOX] sdkbox::PluginGPG::gpg() result is null
0

Hi everyone~!

I have some problem.

First, My Environment is…
Windows7
cocos2d-x 3.17.2
Android Studio
sdkbox
cpp

…and build type is "cmake"

My problem is sdkbox::PluginGPG::gpg() result is null.

Work process is…

  1. make cocos2d-x 3.17.2 cpp project with command line
  2. build setup with sonar system tutorial
  3. build test : success
  4. sdkbox setup with GUI 1.17
    20191004_0
  5. edit CMakeLists.txt
    20191004_1


6. build test : success

Build succeeded.
But crashed when call sdkbox::PluginGPG::gpg()->IsAuthorized().
So i checked gpg.
gpg is null.

How can i init gpg( Game Services )?

CMakeLists.zip (2.1 KB)

Are you sure, you did call sdkbox::PluginGPG::init(); before call any other PluginGPG methods?

Yes~!

bool AppDelegate::applicationDidFinishLaunching()
{
#ifdef SDKBOX_ENABLED
    sdkbox::PluginGPG::init();
#endif
    // initialize director
    auto director = Director::getInstance();

This code is added by sdkbox gui.

there is a example show how to use PluginGPG

Is this correct?
if I manage gameservices. i don’t have to use sdkbox. :slightly_frowning_face:

Is there a way to make the return value of this function not null?

class PluginGPG
{
     ...
     static GameServices* gpg();
};