为什么 Delphi 说“无法解析单元名称 xxx"? [英] Why Delphi says 'cannot resolve unit name xxx'?

查看:23
本文介绍了为什么 Delphi 说“无法解析单元名称 xxx"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Delphi2010 Enterprise Update 4.
当我在 IDE 中打开我的项目并显示主窗体代码时,有 2 个单元名称带有红色下划线.

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.

我已经验证单元源的路径在Library pathBrowsing path中.

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

令人惊讶的是,当我在单元上单击鼠标右键并选择 Open file at cursor 时,它可以正常工作(即 delphi 打开正确的单元).

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).

对此有什么想法吗?

推荐答案

Error Insight 将所有错误消息保存到结构视图中是相当错误的.它不像编译器理解它那样理解你的代码.

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.

Andreas Hausladen 开发了一个 IDE Fix Pack这减少了那些无法解决单元 xyz"问题的数量.

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

它并不能修复错误,但通过解决 Error Insight 的一些线程问题,使它们变得不那么明显.

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

这篇关于为什么 Delphi 说“无法解析单元名称 xxx"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆