views:

868

answers:

2

Hi.

I have lots of components that worked perfectly under D7. I managed to compile and install them by dragging them into the Delphi 2009 IDE. However, when I try to use those components in a project, the compiler says it cannot find the source code of them. Where I can enter the path to that library?


Solution:

I dragged and dropped the old DPK file in Delphi 2009. Then in project manager I choose “Build” an then “Install”. Everything worked smoothly except that the applications that used the controls couldn't see its source. Problem solved by adding the path into the Tool-Options-Library Win32.

Thanks to everybody and especially to Mohammed.

+9  A: 

Have you added the source path of the components to your library path?

you can add it from Tools menu > Options > Library win 32 >Library path

Mohammed Nasman
Ups. I was thinking that the "options" button under "Tools" menu will edit the tools - equivalent of "Configure tools" in Delphi 7.I guess I am still under D7 influence :)Thanks a lot Mohammed.
Altar
You are welcome Altar, D7 was great version, but if you work with D2009 for few days and get used for all new stuff that has been added since D7, you will not miss D7 anymore ;-)
Mohammed Nasman
I already miss a decent function to install components :)Thanks again Mohammed
Altar
+2  A: 

If you've really installed them, then the compiler shouldn't need to find the source code. The compiler only needs the DCU files.

But if you've taken these components from Delphi 7, then you need to have the source code, because Delphi 7 DCU files are not compatible with Delphi 2009. (The only two versions ever that can use each other's DCU files are Delphi 2006 and Delphi 2007, and then only with certain restrictions.)

Trying to use DCU files from the wrong Delphi version will cause Delphi to try to recompile the units. The solution is not just to provide the path to the source code, though. If the units files haven't been compiled yet (and they obviously haven't if they're of the wrong Delphi version), then you haven't really installed anything. Installing components in Delphi has never involved dragging and dropping. Installing a component means installing the package that contains that component, and installing a package often means opening the DPK project file and then choosing the "install" command in the IDE.

Rob Kennedy