SimpleJSON C ++ Class cannot parse strings on Android (NDK), but the same class works on any other platform

I successfully ported the game to Cocos2d-x and it works great on Linux, QNX, iOS, and Mac. I also configure Android NDK and can successfully create and run the application on Android (all from the same sources, which is very neat!)

On Android, however, there is one strange thing: the SimpleJSON.cpp class that I use cannot parse properly formed JSON strings. I use this structure: https://github.com/MJPA/SimpleJSON

I looked at the code, but I don’t know much about the CPP expert to find out what (if any) is wrong with it (it works on all platforms except Android, and it compiles just fine).

I noticed that the class uses wchar_t quite widely, and I also understand that this could be a problem for Android.

In any case, I figured out how to get this to work the last 48 hours, but I failed. Is there anyone who can point me in the right direction?

Is there a compiler option that I forgot to install? Is this class just not going to work on Android? How can I change the class to make it function normally on Android?

All greetings are welcome.

Rgds.

+5
source share
1 answer

Be sure to use the latest framework. Also look for #if defined (ANDROID) in your code, there may be a compilation error for Android.

0
source

All Articles