我正在尝试为安卓构建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目录使用以下命令构建它
使SYSROOT"{MY NDK path}/platform/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是否缺少任何包含目录或配置?
谢谢,
塞尔吉奥
发布于 2010-12-30 21:29:25
Android NDK r5现在支持STL,只需将APP_STL := stlport_static添加到您的Android.mk文件中,APP_STL变量的有效选项为;
请注意,只有gnustl_static变体支持异常。
发布于 2011-01-10 21:22:14
git上的最新版本似乎已经坏了。尝试使用以前的版本(我使用了Wed的版本,2010年12月1日,它工作得很好)。
发布于 2011-01-27 06:02:04
我已经设法使用STLPort GIT仓库在Android NDK R3上编译了STL-Port。然而,一些“适应”是必要的。您可以在procedure here上找到描述。它应该也适用于NDK R5。
希望这能有所帮助。
https://stackoverflow.com/questions/4562899
复制相似问题