Kenneth Cochran
Kenneth Cochran

Reputation: 12064

Perpetual "File not found"

I have two Delphi runtime packages. The SecondPackage includes FirstPackage in its requires clause. One of the other developers recently added several new files to the first package.

Now when I compile the first package I don't have any errors but when I compile the second package I keep getting:

 [DCC Fatal Error] FirstPackage.dpk(91): F1026 File not found: 'SomeFile.dcu'

SomeFile is already contained in FirstPackage but re-adding it to FirstPackage moves SomeFile to the end of the Contains clause and gets me:

[DCC Fatal Error] FirstPackage.dpk(91): F1026 File not found: 'SomeOtherFile.dcu'

I can continue re-adding files until I'm blue in the face and the result is always the same. The first file in the contains clause cannot be found when SecondPackage is compiled.

I've tried deleting all related dcus, dcps and bpls manually and rebuilding but to no avail. Any ideas?

Upvotes: 5

Views: 2088

Answers (1)

Kenneth Cochran
Kenneth Cochran

Reputation: 12064

Grrr! Dang you Delphi IDE! Quit messing with the library path. If I wanted to add an entry I would have done so.

Apparently if the project type is a package and you add a file to it Delphi gets a little trigger happy and adds the file's location to the IDE's global library path. Removing the unnecessary entries allowed the packages to compile. Why these entries prevented one of the packages from compiling in the first place is an other matter.

Upvotes: 2

Related Questions