安装Delphi XE后Delphi 7崩溃(BPL混合路径)
安装 Delphi XE 后,我的旧 Delphi 7 开始更频繁地崩溃。今天,我发现我的一个 BPL 仍然被 D7 加载,即使我从“c:\Program Files\Borland\Delphi7\Projects\Bpl”中删除它。 在搜索整个磁盘后,我在“c:\Users\Public\Documents\RAD Studio\8.0\Bpl”中发现了该 BPL 的副本。
我的问题是:为什么 Delphi 7 在“c:\Users\Public\Documents\RAD Studio\8.0\Bpl”中查找? 我怎样才能说服它只在“c:\Program Files\Borland\Delphi7\Projects\Bpl”中查找?
After installing Delphi XE, my good-old Delphi 7 started to crash more often. Today, I have discovered that one of my BPLs was still loaded by D7 even if I deleted it from "c:\Program Files\Borland\Delphi7\Projects\Bpl".
After I have searched the entire disk I have discovered a copy of that BPL in "c:\Users\Public\Documents\RAD Studio\8.0\Bpl".
My question is: why is Delphi 7 looking in "c:\Users\Public\Documents\RAD Studio\8.0\Bpl"?
How can I convince it to look only in "c:\Program Files\Borland\Delphi7\Projects\Bpl" ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Delphi XE 可能会增加 PATH 环境变量以包含 Delphi XE Bpl 文件夹。 Delphi 7 不知道更好;它像其他所有东西一样调用
LoadLibrary
,并搜索系统路径。按照 Delphi 示例,为您的包指定特定于版本的后缀,以反映它们适用于哪个版本的 Delphi。您应该能够在项目选项中进行配置,否则您只能拥有名称中已包含版本后缀的特定于版本的项目文件。这样,即使 Delphi XE 版本的包在路径上可见,它也不会有正确的名称,因此 Delphi 7 不会尝试加载它。
Delphi XE probably augments the PATH environment variable to include the Delphi XE Bpl folder. Delphi 7 doesn't know any better; it calls
LoadLibrary
just like everything else, and that searches the system path.Follow the Delphi example and give your packages version-specific suffixes reflecting what version of Delphi they're for. You should be able to configure that in the project options, or else you can just have version-specific project files that already have the version suffixes in their names. That way, even if the Delphi XE version of the package is visible on the path, it won't have the right name, so Delphi 7 won't try to load it.