首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >构建STLport NDK r5/ Android时出现问题

构建STLport NDK r5/ Android时出现问题
EN

Stack Overflow用户
提问于 2010-12-30 21:19:07
回答 3查看 4.2K关注 0票数 2

我正在尝试为安卓构建STLport。我得到了以下步骤,但它们不起作用:

1-使用以下方法克隆STLport存储库:

git克隆git://stlport.git.sourceforge.net/gitroot/stlport/stlport

2-使用以下命令配置环境:

代码语言:javascript
复制
./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

但我得到了以下错误:

代码语言:javascript
复制
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

是否缺少任何包含目录或配置?

谢谢,

塞尔吉奥

EN

回答 3

Stack Overflow用户

发布于 2010-12-30 21:29:25

Android NDK r5现在支持STL,只需将APP_STL := stlport_static添加到您的Android.mk文件中,APP_STL变量的有效选项为;

  • stlport_static
  • stlport_shared
  • gnustl_static

请注意,只有gnustl_static变体支持异常。

票数 2
EN

Stack Overflow用户

发布于 2011-01-10 21:22:14

git上的最新版本似乎已经坏了。尝试使用以前的版本(我使用了Wed的版本,2010年12月1日,它工作得很好)。

票数 0
EN

Stack Overflow用户

发布于 2011-01-27 06:02:04

我已经设法使用STLPort GIT仓库在Android NDK R3上编译了STL-Port。然而,一些“适应”是必要的。您可以在procedure here上找到描述。它应该也适用于NDK R5。

希望这能有所帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4562899

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档