Why Delphi says 'cannot resolve unit name xxx'?

I reset the library path under tools\options\environment options\delphi options\library.

Click the dropdown box, and reselect your os, and it will reset the path to the library. Worked for me.


Error Insight which keeps all the error messages into the structure view is quite buggy. It doesn't understand your code the way the compiler understands it.

There is an IDE Fix Pack developed by Andreas Hausladen which reduces the number of those "Cannot resolve unit xyz" problems.

It doesn't fix the bug, but it makes them less visible by addressing some of the Error Insight's threading problems.


Out of curiosity, is there any code in AdPort and/or AdStatLt that is subject to conditional compilation ?

The parser that underpins Error Insight is I think different (physically and contextually) from the compiler. The compiler may be able to make sense of those conditional compilation areas that Error Insight is not.

This is just speculation on my part, but Error Insight is much improved in Delphi 2010 and typically now only chokes when there are errors in my code that I have yet to resolve.