Cocos2d-x APP_STL := c++_static problem on Android

General discussion about the R.U.B.E editor
Post Reply
barisatamer
Posts: 3
Joined: Thu Jan 16, 2014 5:15 pm

Cocos2d-x APP_STL := c++_static problem on Android

Post by barisatamer »

Changing the line APP_STL := gnustl_static to APP_STL := c++_static in jni/Application.mk causes a strange problem in my project.

I discovered that the problem starts with j2b2World(Json::Value& worldValue, b2World* world) method in b2dJson.cpp

I guess there is a problem with this code block :

Code: Select all

    int i = 0;
    Json::Value bodyValue = worldValue["body"][i];
    while ( !bodyValue.isNull() ) {
        b2Body* body = j2b2Body(world, bodyValue);
        readCustomPropertiesFromJson(body, bodyValue);
        m_bodies.push_back(body);
        m_indexToBodyMap[i] = body;

        i++;
        bodyValue = worldValue["body"][i];
    }

I need to use Google IAP plugin in cocos2d-x and a script called gameDevGuide.sh (in cocos2d/plugin/tools folder ) makes that change to Application.mk

I am using cocos2d-x 3.3 final and Android NDK r10.

What should I do to fix that problem ? Thanks in advance.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Cocos2d-x APP_STL := c++_static problem on Android

Post by iforce2d »

You mentioned the problem many times without actually telling us what it is. Is it a compile time error? Presumably there is some error message that makes you suspect that part of the code? Or it crashes there at runtime? Give us a clue ;)
Post Reply