Why Delphi says 'cannot resolve unit name xxx'?

前端 未结 5 572
南旧
南旧 2021-01-11 16:56

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 r

5条回答
  •  天命终不由人
    2021-01-11 17:20

    Just disable Error Insight (Tools -> Options -> Editor Options -> Code Insight, uncheck Error Insight). It works fine for me.

    Source: http://codeverge.com/embarcadero.delphi.ide/cannot-resolve-unit-name-forms/1041789

    This is a cosmetic issue only, and doesn't affect your application in any way.

    It's caused by a bug in the compiler used for Error Insight (the functionality that gives you the wavy red lines), which is not the same compiler used to build your application or to compile from the command line. The bug has existed since Error Insight was first introduced. (It has gotten less frequent, though; it used to be that the first thing I would do when I installed Delphi was to disable Error Insight, and I haven't had to do that with either D2007 or D2009 as the problem is very infrequent and do esn't seem to last long for whatever reason.)

    Since there really isn't a problem (other than the cosmetic issue), you can either ignore it or get rid of it by disabling Error Insight (Tools -> Options -> Editor Options -> Code Insight, uncheck Error Insight).

提交回复
热议问题