开发者

Installing Same Components Under Delphi 2009 and Delphi XE not working

开发者 https://www.devze.com 2023-03-21 15:21 出处:网络
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 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 componen开发者_JS百科ts 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!


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消