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

发布于 2024-10-09 14:17:05 字数 2195 浏览 3 评论 0原文

我正在尝试为 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 目录构建它使用

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

是否有我缺少的包含目录或配置?

谢谢,

塞尔吉奥

I'm trying to build STLport for Android. I got the following steps, but they are not working:

1 - Clone STLport repository using:

git clone git://stlport.git.sourceforge.net/gitroot/stlport/stlport

2 - Configure environment using :

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

3 - From src directory build it using

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

But I got the following errors:

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

Is there any include dir or configuration I´m missing?

Thanks,

Sergio

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

等数载,海棠开 2024-10-16 14:17:05

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

  • stlport_static
  • stlport_shared
  • gnustl_static

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

Android NDK r5 now has STL support, just add APP_STL := stlport_staticto your Android.mk file, valid options for APP_STL variable are;

  • stlport_static
  • stlport_shared
  • gnustl_static

Note that only gnustl_static variant supports exceptions.

嗼ふ静 2024-10-16 14:17:05

我已经设法使用 STLPort GIT 存储库在 Android NDK R3 上编译 STL-Port。然而,一些“适应”是必要的。您可以找到有关该过程的说明

希望有帮助。

I've manage to compile STL-Port on Android NDK R3 using STLPort GIT repository. A few "adaptations" are necessary however. You can find a description on the procedure here. It should work for NDK R5 too.

Hope that helps.

番薯 2024-10-16 14:17:05

git 上的最后一个版本似乎已损坏。尝试使用以前的版本(我使用的是 2010 年 12 月 1 日星期三的版本,效果很好)。

The last version on git seems to be broken. Try use a previous version (I've used the one from Wed, Dec 1st 2010 and it worked fine).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文