如何在 Delphi 6 包中使用 FastMM4?

发布于 2024-10-06 17:37:39 字数 215 浏览 0 评论 0原文

我一直在我的Delphi 6 Pro应用程序中顺利使用FastMM4版本4.92。我现在想在我创建的包(BPL)中使用它。我尝试将单元放入“包含”部分,然后将它们移至列表顶部,但我仍然收到来自 FastMM4 的错误,抱怨它不是第一个要初始化的单元。为了解决这个问题,我想将 FastMM4 放在 Requires 部分,但我在任何地方都找不到 FastMM4 的 DCP 文件(运行时库)。有谁知道如何实现这一点?

I have been using FastMM4 version 4.92 in my Delphi 6 Pro application smoothly. I now want to use it in a package I created (BPL). I tried putting the units in the Contains section and then moving them to the top of the list but I still get the error from FastMM4 complaining that it is not the first unit to be initialized. To fix this I want to put FastMM4 in the Requires section but I can't find a DCP file for FastMM4 anywhere (runtime library). Does anyone know how to make this happen?

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

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

发布评论

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

评论(2

⊕婉儿 2024-10-13 17:37:39

可能,您遇到此错误的原因是您不应该将 FastMM4 单元包含在您的包中,而是包含在您正在测试(使用)新创建的包的项目中(当然在“使用”部分的第一个位置)。

Probably, the reason you've got this error is that you should include FastMM4 unit not in your package, but in project where you are testing(using) your newcreated package(ofcourse on the first place in 'uses' section).

娇纵 2024-10-13 17:37:39

您是否在 FastMM4Options.inc 文件中设置了 UseRuntimePackages?否则,您可以尝试使用 ShareMem 和 FastMM 附带的 BorlndMM.dll 替代品。尽管 ShareMem 是为 DLL 设计的,但它的使用应该将所有内存管理例程路由到 BorlndMM.dll 中的那些例程,从而允许标准包和您的包都使用 FastMM 代码。

Did you set UseRuntimePackages in the FastMM4Options.inc file? Otherwise you could try to use ShareMem and the BorlndMM.dll replacement that comes with FastMM. Although ShareMem is designed for DLLs, its use should route all memory management routines to those in the BorlndMM.dll, allowing both the standard packages and yours to use FastMM code.

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