TechTricks
Technical answers from the trenches 
 
 
 
 

     
   
Compilation Error: File Not Found
 
   
 Posted: 5 December 2000
 
   
 
 Applies to: Delphi 4 and later
 
   
 
Audience: Everyone
 
       
   

Question: When I compile my application, I get a "File Not Found" error, but the file in question exists and my Search Paths option points to the directory containing the file. What's going on and how do I fix it?

Answer: Check the Project Manager to see if it includes a reference to the file in question. If so, make sure that reference points to the correct location. In most cases, it doesn't.

If this is the case, try simply removing the file from the Project Manager. Because the directory is in your search path, Delphi should be able to find the next time you compile the project.

Why this would happen

We usually enounter this particular problem after moving a project's source to a new directory structure. While not a typical situation, it does happen. For example, suppose:

  • You're moving code to a new machine and decide to reorganize the way you store your projects.

  • You've installed a version control system and need to restructure the way your project is laid out to make the version control system easier to manage.

  • You've restored the source from an archive and have forgotten the original directory structures.

  • You've upgraded your compiler and haven't installed your support files into the same directory structure or are using files with different names (such as version specific packages).

  • Multiple developers are involved in the project and each prefers to organize their source files differently.

  • And so on...

Note: You can avoid this situation in the case of multiple developers by requiring each one to configure their systems similarly. We recommend against this, however, because there is a risk that the requirement would be seen as autocratic if the dictated configuration differs significantly from a developer's preferences. We prefer the recommended solution because it supports the widest range of development styles.

In general, we prefer flexible solutions over restrictive ones. Your mileage may vary.

 

       

Top

Feedback About Paradox Delphi Assorted Web Stuff
 
 
Copyright © 2000-2004, techtricks.com; All Rights Reserved.
Acknowledgements, Disclaimers, Terms and Conditions.
Article last updated on 31 May 2003

 

Other Sites: Paradox, Delphi, Perl, Web Stuff, and More


 

[- End -]