我可以在 uclibc Linux 上使用 boost 吗?

发布于 2024-07-09 09:49:02 字数 103 浏览 5 评论 0 原文

有谁有在基于 uclibc 的系统上运行使用 boost 库的 C++ 应用程序的经验吗? 有可能吗? 您会使用哪个 C++ 标准库? uclibc++ 可以与 boost 一起使用吗?

Does anyone have any experience with running C++ applications that use the boost libraries on uclibc-based systems? Is it even possible? Which C++ standard library would you use? Is uclibc++ usable with boost?

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

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

发布评论

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

评论(5

攒眉千度 2024-07-16 09:49:02

我们在运行 uClinux 的 ARMv4 平台上将 Boost 与 GCC 2.95.3、libstdc++ 和 STLport 一起使用。 Boost 的某些部分与 GCC 2.x 不兼容,但在我们的特定情况下运行良好的部分。 我们最常用的库是date_timebindfunctiontuplethread

我们遇到问题的一些库是 lambdashared_pointerformat。 这些问题很可能是由我们的 GCC 版本引起的,因为当您有太多包含或深层次的模板结构时,它会出现问题。

如果可能的话,我建议您使用特定的工具链运行 boost 测试套件,以确保兼容性。 至少您可以编译一个本机工具链以确保您的库版本兼容。

我们没有使用 uClibc++,因为这不是我们的工具链提供商推荐的,所以我无法评论该特定组合。

We use Boost together with GCC 2.95.3, libstdc++ and STLport on an ARMv4 platform running uClinux. Some parts of Boost are not compatible with GCC 2.x but the ones that are works well in our particular case. The libraries that we use the most are date_time, bind, function, tuple and thread.

Some of the libraries we had issues with were lambda, shared_pointer and format. These issues were most likely caused by our version of GCC since it has problems when you have too many includes or deep levels of template structures.

If possible I would recommend you to run the boost test suite with your particular toolchain to ensure compatibility. At the very least you could compile a native toolchain in order to ensure that your library versions are compatible.

We have not used uClibc++ because that is not what our toolchain provider recommends so I cannot comment on that particular combination.

生寂 2024-07-16 09:49:02

我们在 Arcom Vulcan 对于嵌入式设备(64M RAM,533MHz XScale)来说,它无疑非常强大。 一切都很顺利。

GCC 3.4,但我们不使用 uclib++(Arcom 提供了一个包含 libstd++ 的工具链)。

假设有良好的编译器支持,许多嵌入式设备会很乐意运行许多 Boost 库。 只要注意使用即可。 Boost 库提高了抽象级别,并且可以轻松使用比您想象的更多的资源。

We are using many of the Boost libraries (thread, filesystem, signals, function, bind, any, asio, smart_ptr, tuple) on an Arcom Vulcan which is admittedly pretty powerful for an embedded device (64M RAM, 533MHz XScale). Everything works beautifully.

GCC 3.4 but we're not using uclib++ (Arcom provides a toolchain which includes libstd++).

Many embedded devices will happily run many of the Boost libraries, assuming decent compiler support. Just take care with usage. The Boost libraries raise the level of abstraction and it can be easy to use more resources than you think.

魔法唧唧 2024-07-16 09:49:02

我用谷歌搜索“uclibc stlport”。 似乎至少有几个版本的 uclibc 可以编译 stlport (参见 这个)。
鉴于此,我想说 Boost 只需几个编译步骤即可实现。 我读过 David Abrahams(他是 boost 社区的活跃成员)的一条消息,其中说 Boost 并不直接依赖于所使用的 libc。 但某些库仍然可能会导致问题,例如 Boost.Python,因为它依赖于其他东西(在我的示例中是 Python),而这些东西可能很难用 uclibc 进行编译。

希望这可以帮助

I googled "uclibc stlport". It seems there are at least a few versions of uclibc for which stlport can be compiled (see this).
Given that, i'd say Boost is just a few compilation steps away. I have read a message by David Abrahams (who is an active member of the boost community) that says that Boost does not depend directly on the used libc. But some libraries may still cause problems, Boost.Python for instance, since it depends on something else (Python in my example) that might be difficult to compile with uclibc.

Hope this helps

黑色毁心梦 2024-07-16 09:49:02

我没有尝试过,但我不知道有关 uclibc 的任何信息会阻止 Boost 工作。

我想说,尝试一下,看看会发生什么。

I have not tried but I don't know anything about uclibc that would prevent Boost from working.

Try it and see what happens, I would say.

浊酒尽余欢 2024-07-16 09:49:02

是的,您可以将 boost 与 uclibc 一起使用。
我用 boost 1.45 & 尝试过这个 ARM9260 上的 uclibc

  1. 使用新的 OpenEmbedded
  2. 将其配置为使用 Angstrom
  3. 配置 Angstrom 以使用 uclibc
  4. make boost - bitbake boost

Yes you can use boost with uclibc.
I tried this with boost 1.45 & uclibc on ARM9260

  1. Use fresh OpenEmbedded
  2. Configure it to use Angstrom
  3. Configure Angstrom to use uclibc
  4. make boost - bitbake boost
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文