如何在 Delphi 6 包中使用 FastMM4?
我一直在我的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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能,您遇到此错误的原因是您不应该将 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).
您是否在 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.