I'm trying to install a 3rd party package for Delphi 7. After opening the DPK, I pressed the Install
button, and got a File not found
error. The same happens if I press Compile
first, and then Install
.
The error message refers to the unit which is listed first in the contains
section of the DPK. The package directory does not contain PAS files, but it contains the DCU for every PAS listed in the contains
section. The package directory is added to the Library path
. I tried to turn off Explicit rebuild
, but it didn't help. I also tried to remove the references to PAS files and add the DCU files instead, but the error message remained the same.
Delphi apparently wants to recompile the package, but I don't have the source files. What should I do to make it use the DCUs? Thank you for your help in advance.
The fact that the compiler wants the source (even though the .dcus are available) usually means that the .dcu files were compiled by a different version of Delphi. .dcu files are not compatible across compiler versions (with the single exception of D2006->D2007), meaning that every new version release of the compiler means all your source needs to be recompiled in order to be compatible with it.
You'll need to contact the vendor to get new .dcu files that are compatible with your current Delphi version.
If you have the updated source already, the compiler is not finding it in order to recompile, which means you need to check the Project->Options->Directories and Conditionals->Search Path to make sure it's updated. You may also need to check Tools->Options->Environment Options->Delphi Options->Library - Win32->Search Path, depending on how you installed the previous version.
This is the reason that you should never buy or use third-party packages without getting the source code. You now depend on the vendor getting the files out to you (or still being in business), and you're stuck until they do.
There is an update for Delphi 7 (known as 7.1). DCUs are not compatible between these. Do you have the update installed? Please see:
http://edn.embarcadero.com/article/32337
http://edn.embarcadero.com/article/32400
File not found error means the compiler can not find the pas files. "The package directory does not contain PAS files..." but you added the package directory to the Library path so the compiler can not find the pas files. Make sure there is a library path set in the IDE to the folder containing the pas files for the package if you have the pas files. If you do not have the pas files then get them from the developer.