Fatal error: file not found somename.dcu

When I'm compiling my project, it says "[Fatal error] Project.dpr(9): File not found: 'somename.dcu'". Where somename.dcu belongs to a form which I had removed from the project some months ago using de '-' button of the Delphi 6 Pro toolbar.

It gives this error in the Project.dpr file in a line of the uses Forms clause:

  Principal in 'Principal.pas' {FPrincipal},
  ModulDades in 'ModulDades.pas' {FModulDades: TDataModule},
  Secundari in 'Secundari.pas' {FSecundari},
  Inicialitza in 'Inicialitza.pas' {FInicialitza},
  Serveis in 'Serveis.pas' {FServeis}; //<-error here

If I remove Serveis.pas from the project, the error is fixed, but this is not a solution.

I have done a search of any reference to this file in almost any file of the project and can't find it.

How can I erase that insidious reference? Where can it be located?
Who is Participating?
ITugayConnect With a Mentor Commented:
Hi nasheerz,

it can be located in uses clause of some unit in your project. Be carefull, uses clause may be twice in each unit: in interface and in implementation parts.

"If I remove Serveis.pas from the project, the error is fixed, but this is not a solution."

Why not?

Does the file Serveis.pas exists? And does your program needs this file? If not, delete the reference.


nasheerzAuthor Commented:
The file serveis.pas exists, I just added it to the project. And yes, my aplication needs the file.
nasheerzAuthor Commented:
Ups, u're right! Here you have your hard worked points. %)
thanx :-)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.