Installing Same Components Under Delphi 2009 and Delphi XE not working

荒凉一梦 提交于 2019-12-11 04:23:37

问题


I have a set of custom components that I've been using in D2009. I have installed Delphi XE, and I'd like to be able to use these components in both IDE's while I'm upgrading my projects. But when I install them in XE, they are no longer really usable in D2009. A project will still compile, but the components no longer show up in the Tool Palette, and they don't appear in the form designer either.

No matter how I try to uninstall/reinstall, etc., I can't get the components to work in D2009. I've verified that both IDE's have the component's directory in their library path.

What do I need to do here to get the components working in both IDE's?

Thanks!


回答1:


The different versions of Delphi produce different sets of packages (*.bpl files) in different paths ("package output directory"). The design packages have to be loaded at runtime by the IDE. Now the Windows search path probably comes into play; when D2009 wants to load package x.bpl it resolves to the (incompatible) XE version of it because XE's package output directory is in the system search path before D2009's - this happens if you installed D2009 first and XE later (recommended).

The solution is to always use Library Suffix for your packages. I suggest you go by Delphi's own convention and use 120 for D2009 packages and 150 for XE packages. Your x.bpl becomes x120.bpl for D2009 and x150.bpl for XE.



来源:https://stackoverflow.com/questions/6747574/installing-same-components-under-delphi-2009-and-delphi-xe-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!