简体   繁体   English

在Delphi 7中找不到文件'dxDBGrid.dcu'

[英]File not found in Delphi 7 'dxDBGrid.dcu'

我怎么能修复这个错误,从哪里得到dxDBGrid文件,我是Delphi的新手,我得到:[致命错误]文件找不到:'dxDBGrid.dcu'

As others have already told you, that's the file that contains Developer Express's TdxDBGrid. 正如其他人已经告诉过你的那样,那是包含Developer Express的TdxDBGrid的文件。 It's quite an expensive product, so before you go off and purchase it, it would be wise to see if you actually need it (I'll explain why I have a hunch you might not in a moment). 这是一个相当昂贵的产品,所以在你去购买它之前,明智的做法是看你是否真的需要它(我会解释为什么我有一种预感,你可能不会在一瞬间)。

First thing to do is do a Find in Files search through all the units in your project, to see which of them lists dxDBGrid in the Uses list in its Interface section. 首先要做的是在文件中查找,搜索项目中的所有单元,以查看哪些列表在其“接口”部分的“使用”列表中列出了dxDBGrid。 Once you've found the file try and open it and see if the form contains a component of type TdxDBGrid. 一旦找到该文件,请尝试打开它,看看该表单是否包含TdxDBGrid类型的组件。 If it doesn't, remove dxDBGrid from the unit's uses list and try recompiling. 如果没有,请从单元的使用列表中删除dxDBGrid并尝试重新编译。

The error may go away, in which case, problem solved. 错误可能会消失,在这种情况下,问题就解决了。 The reason I think the error might go away is that typically, using a TdxDBGrid on a form causes a lot of other units from the DevEx package to be added to the unit, in addition to dxDBGrid, and usually they would appear in the unit's Uses list ahead of dxDBGrid, so if Delphi really can't find the files of the DevEx library, it's surprising Delphi isn't complaining about not being able to find those before it gets to dxDBGrid. 我认为错误可能消失的原因是,通常情况下,除了dxDBGrid之外,在表单上使用TdxDBGrid会导致DevEx包中的许多其他单元被添加到单元中,并且通常它们会出现在单元的用途中在dxDBGrid之前列出,所以如果Delphi真的找不到DevEx库的文件,那么令人惊讶的是Delphi并没有抱怨在它到达dxDBGrid之前无法找到它们。 So if it uses dxDBGrid alone of the Devex package (other units in their package typically begin with dx or cx), it's possibly only there is a historical hangover. 因此,如果它单独使用dexx包的dxDBGrid(其包中的其他单元通常以dx或cx开头),则可能只有历史宿醉。 Otoh, if the unit does use other dxXXX or cxXXX units and Delphi isn't complaining about not being able to find their DCU files, it must be finding them (in .DCU or .PAS form) ok. Otoh,如果该单元确实使用其他dxXXX或cxXXX单元并且Delphi没有抱怨无法找到他们的DCU文件,则必须找到它们(以.DCU或.PAS形式)。

If you're still stuck, post the Interface section of the unit which provokes the compiler error you described. 如果您仍然卡住,请发布单元的接口部分,这会引发您描述的编译器错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM