When compiling my C++ for an iOS project, all proceeds just fine. However, I'm encountering difficulties on Android.
My Application.mk reads:
APP_ABI := armeabi armeabi-v7a
APP_PLATFORM := android-11
APP_STL := stlport_shared
All the LOCAL_SRC_FILES are defined.
When I try to build my module I get the following compiler error:
jni/Game.hpp: In member function 'const std::pair<pos, Obj*>* MyEnumerator::next()':
jni/Game.hpp:126:23: error: expected type-specifier
jni/Game.hpp:126:23: error: cannot convert 'int*' to 'std::pair<pos, Obj*>*' in assignment
jni/Game.hpp:126:23: error: expected ';'
The line of code referred to above reads:
this->ptr = new pair<pos, Obj*>::pair(it->first, it->second);
Here, ptr
is of type pair<pos, Obj*>*
and pos
is a struct. I've declared using std::pair;
.
Any hints on what is wrong, and what to try?