私の C++ を iOS プロジェクト用にコンパイルすると、すべてうまくいきます。ただし、Android で問題が発生しています。
私の Application.mk の読み取り:
APP_ABI := armeabi armeabi-v7a
APP_PLATFORM := android-11
APP_STL := stlport_shared
すべての LOCAL_SRC_FILES が定義されています。
モジュールをビルドしようとすると、次のコンパイラ エラーが発生します。
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 ';'
上記のコード行は次のとおりです。
this->ptr = new pair<pos, Obj*>::pair(it->first, it->second);
ここでptr
は、型pair<pos, Obj*>*
でpos
あり、構造体です。宣言しましたusing std::pair;
。
何が間違っているか、何を試すべきかについてのヒントはありますか?