我可以在 Palm OS 应用程序中使用标准 C 库吗?

发布于 2024-07-07 02:27:26 字数 120 浏览 8 评论 0原文

Palm OS 应用程序的已发布代码不包含标准标头,而是使用 Palm OS API 来实现 StrCopy 和 MemMove 等功能。 我可以使用标准标头和函数吗?或者我是否需要转换我的代码以使用 Palm OS 版本?

The published code for Palm OS applications doesn't include standard headers, but instead uses Palm OS APIs for things like StrCopy and MemMove. Can I use standard headers and functions or do I need to convert my code to use the Palm OS versions?

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

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

发布评论

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

评论(2

|煩躁 2024-07-14 02:27:26

从程序大小的角度来看,最好尽可能使用 Palm OS API,因为这意味着您不必将库中的代码包含在生成的“可执行文件”中。 如果您使用编译器提供的库中的函数,则该函数的代码将被添加到您的每个程序中,从而增加其大小。

From a program size point of view its better to use the Palm OS API whenever possible, since that means you don't have to include the code from the library in the generated 'executable'. If you use functions from the compiler provided libraries the code of that functions will be added to each of your programs increasing their sizes.

谷夏 2024-07-14 02:27:26

这取决于编译器以及您使用的工具版本。 一般来说,如果您可以使用 Palm OS API,您可能会在该平台上工作得更好,但是 CodeWarrior 和 prc-tools 都实现了一些库函数。

在 Palm OS V9 的 CW 中,有一个相当完整的 Metrowerks 标准库 (MSL) 版本。 大多数 MSL C++ 都可以让您访问 STL 和其他结构。 在 C 方面,您已经获得了用于内存管理和字符串函数的大部分标准 C 头文件。 但是,它省略了区域设置、数学、信号和标准 I/O 的实现。

要使用该库,您需要确保链接到 MSL C/C++ 库。 这可以在您在向导中创建项目时进行设置,也可以稍后通过修改访问路径并为您的目标添加适当的静态库来添加。

It depends on the compiler and what version of the tools you're using. In general, if you can use Palm OS APIs, you'll probably work better on the platform, but both CodeWarrior and prc-tools had some library functions implemented.

In CW for Palm OS V9, there's a pretty full version of the Metrowerks Standard Library (MSL). Most of MSL C++ is there giving you access to STL and other constructs. On the C front, you've got most of the standard C headers for memory management and string functions. However, it omits implementations for locales, math, signals, and standard I/O.

To use the library, you need to make sure you link with the MSL C/C++ libraries. This can be set when you create your project in the wizard or added later by modifying the access paths and adding the appropriate static libraries for your targets.

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