我在编译我的 Delphi 代码时遇到问题。我有 3 个类,XmlFileManager(具体)、XmlNodeManager(抽象)、XmlEnpManager(XmlNodeManager 和具体的子级)。下面,一些定义类代码:
xml文件管理器
unit XmlFileManager;
interface
uses
xmldom, XMLIntf, msxmldom, XMLDoc, SysUtils, DateUtils, Classes, Dialogs,
XmlNodeManager, XmlEnpManager;
type
TXmlFileManager = class
[...]
end;
[...]
end.
XmlNodeManager
unit XmlNodeManager;
interface
uses
xmldom, XMLIntf, msxmldom, XMLDoc, SysUtils, DateUtils, Classes, Dialogs,
XmlFileManager;
type
TXmlNodeManager = class
[...]
end;
[...]
end.
XmlEnpManager
unit XmlEnpManager;
interface
uses
xmldom, XMLIntf, msxmldom, XMLDoc, SysUtils, DateUtils, Classes, Dialogs,
XmlFileManager, XmlNodeManager;
type
TXmlEnpManager = class (TXmlNodeManager)
[...]
end;
[...]
end.
在 XmlNodeManager 和 XmlEnpManager 中,无法识别 TXmlFileManager 类。我编译时,编译失败并显示消息:
[dcc32 致命错误] SiGAS.dpr(23): F1026 File not found: 'XmlManager.dcu'
过去,XmlFileManager 被称为 XmlManager。有任何想法吗 ?。
我的.dpr:
uses
Forms,
Main in 'forms\Main.pas' {Principal},
Globals in 'units\Globals.pas',
CrearProyectoForm in 'forms\CrearProyectoForm.pas' {NuevoProyecto},
Validadores in 'units\Validadores.pas',
IdiomaClass in 'units\IdiomaClass.pas',
IdiomaCastellanoClass in 'units\IdiomaCastellanoClass.pas',
ExcelFileManagerClass in 'units\ExcelFileManagerClass.pas',
SeleccionarIdioma in 'forms\SeleccionarIdioma.pas' {SelectLang},
EnpView in 'forms\EnpView.pas' {ENP},
EnpViewGeneric in 'forms\EnpViewGeneric.pas' {EnpGeneric},
Vcl.Themes,
Vcl.Styles,
EnpViewAdd in 'forms\EnpViewAdd.pas' {EnpAdd},
EnpViewAddAfter in 'forms\EnpViewAddAfter.pas' {EnpAddAfter},
EnpViewEdit in 'forms\EnpViewEdit.pas' {EnpEdit},
EnpInicial in 'forms\EnpInicial.pas' {ENPViewInicial},
XmlFileManager in 'units\XmlFileManager.pas',
XmlNodeManager in 'units\XmlNodeManager.pas',
XmlEnpManager in 'units\XmlEnpManager.pas';