2

Android用のSTLportを構築しようとしています。次の手順を実行しましたが、機能していません。

1 - 以下を使用して STLport リポジトリのクローンを作成します。

git クローン git://stlport.git.sourceforge.net/gitroot/stlport/stlport

2 - 以下を使用して環境を構成します。

./configure --target=arm-eabi --with-extra-cxxflags="-fshort-enums" 
            --with-extra-cflags="-fshort-enums" 

3 - src ディレクトリから、次を使用してビルドします

make SYSROOT"{MY NDK path}/platforms/android-5/arch-arm/" release-static

しかし、次のエラーが発生しました。

In file included from ../stlport/stl/_alloc.h:45,
                 from ../stlport/memory:29,
                 from dll_main.cpp:41:
../stlport/stl/_new.h:45:24: error: new: No such file or directory
In file included from ../stlport/stl/_limits.h:36,
                 from ../stlport/limits:29,
                 from dll_main.cpp:48:
../stlport/stl/_cwchar.h:26:30: error: cstddef: No such file or directory
In file included from ../stlport/stl/_utility.h:35,
                 from ../stlport/utility:35,
                 from dll_main.cpp:40:
../stlport/type_traits:889: error: 'declval' was not declared in this scope
../stlport/type_traits:889: error: expected primary-expression before '>' token
../stlport/type_traits:889: error: expected primary-expression before ')' token
../stlport/type_traits:889: error: 'declval' was not declared in this scope
../stlport/type_traits:889: error: expected primary-expression before '>' token
../stlport/type_traits:889: error: expected primary-expression before ')' token
../stlport/type_traits:889: error: ISO C++ forbids declaration of 'decltype' with no type
../stlport/type_traits:889: error: ISO C++ forbids in-class initialization of non-const static member 'decltype'
../stlport/type_traits:889: error: template declaration of 'int std::tr1::detail::decltype'
../stlport/type_traits:942: error: ISO C++ forbids declaration of 'decltype' with no type
../stlport/type_traits:942: error: ISO C++ forbids in-class initialization of non-const static member 'decltype'
../stlport/type_traits:942: error: template declaration of 'int std::tr1::detail::decltype'
make: *** [obj/arm-eabi-gcc/so/dll_main.o] Error 1

欠落しているインクルードディレクトリまたは構成はありますか?

ありがとう、

セルジオ

4

3 に答える 3

2

Android NDK r5 は STL をサポートするようになりました。ファイルに追加APP_STL := stlport_staticするだけです。変数Android.mkの有効なオプションは次のとおりです。APP_STL

  • stlport_static
  • stlport_shared
  • gnustl_static

gnustl_staticバリアントのみが例外をサポートすることに注意してください。

于 2010-12-30T13:29:25.463 に答える
0

git の最後のバージョンは壊れているようです。以前のバージョンを使用してみてください (2010 年 12 月 1 日水曜日のものを使用しましたが、問題なく動作しました)。

于 2011-01-10T13:22:14.337 に答える
0

STLPort GITリポジトリを使用して、Android NDK R3でSTL-Portをコンパイルすることができました。ただし、いくつかの「適応」が必要です。手順の説明については、こちらを参照してください。NDK R5 でも機能するはずです。

それが役立つことを願っています。

于 2011-01-26T22:02:03.740 に答える