gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-29 00:49:00 25 4
gpt4 key购买 nike

我正在尝试为 Android 构建 STLport。我执行了以下步骤,但它们不起作用:

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

git clone 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"{我的 NDK 路径}/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

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

谢谢,

塞尔吉奥

最佳答案

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

  • 静态端口
  • STLport_shared
  • gnuSTL_static

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

关于android - 构建 STLport NDK r5/Android 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4562899/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com