Why Delphi says 'cannot resolve unit name xxx'?

TridenT picture TridenT · Nov 24, 2010 · Viewed 25.9k times · Source

I'm working with Delphi2010 Enterprise Update 4.
When I'm opening my project in the IDE and displaying the mainform code, there are 2 unit names underline in red.

xxx http://img268.imageshack.us/img268/6475/unitnameunresolved.png.

I have verified that the path to the unit source is in the Library path and in the Browsing path.

Surprisingly, when I'm doing a right-clicking on the unit and selecting Open file at cursor, it works (ie. delphi opens the right unit).

Any idea about that ?

Answer

Bharat picture Bharat · Nov 24, 2010

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.