Mega Code Archive

 
Categories / Delphi / Examples
 

The painful ’file not found ’system pas’’ compiler error

Anyone who has had this error in the past has known how painful it is to resolve. Its not a helpful error message, and it lies. Well anyone that has had this error before may know how painful it is to resolve. The error message itself is a great big lie which really distracts you from the cause. So what is the cause? Well, anyone that has read my other article about entitled Tidy Component Library for Easy Migrations or Builds ( http://www.howtodothings.com/showarticle.asp?article=782 ) may already have guessed the cause. Whilst this wonderful approach to helping us have a somewhat reduced stress time maintaining Delphi installs on one or more machines, it is also the cause of this annoying error. Well, in part. This error is actually caused by having a path duplicated in the Delphi Library list. One path perhaps formed using the Environment Variable approach, and one entered by an install program perhaps which is a full-path reference to the same directory. Hopefully you can see above that \Jedi\JCL\1.92.1661 appears twice. Once with a $(COMN_COMP) prefix and the other with a full drive and path listing. How can we cure this error? Well it is very simple. Remove one of the duplicated references to the same directory, though I would recommend removing the full-path and keeping the environment variable path if you use such an approach.