【问题标题】:unsatisfied forward or external declaration不满意的转发或外部声明
【发布时间】:2013-05-23 17:03:48
【问题描述】:

编译.pas 文件时出现错误。

“未满足的前向或外部声明:TxxxException.CheckSchemeFinMethodDAException。”

有谁知道这个错误意味着什么?

这是否意味着 CheckSchemeFinMethodDAException 没有在所有相关文件中调用?

【问题讨论】:

    标签: delphi compiler-errors


    【解决方案1】:

    你已经声明了这个方法但是没有实现它。

    【讨论】:

    • 只需按Ctrl+Shift+C将方法添加到实现部分
    【解决方案2】:
    unit Unit1;
    
    interface
    
    type
      TMyClass = class
        procedure DeclaredProcedure;
      end;
    
    implementation
    
    end.
    

    这会产生您描述的错误。 DeclaredProcedure 过程是declared(签名)但不是定义(实现部分为空)。

    您必须提供该过程的实现。

    【讨论】:

      【解决方案3】:

      您可能忘记在实现部分中将类名放在函数名之前。例如,以下代码将产生您的错误:

      unit Unit1;
      
      interface
      
      type
        TMyClass = class
          function my_func(const text: string): string;
        end;
      
      implementation
      
      function my_func(const text: string): string;
      begin
        result := text;
      end;
      
      end.
      

      要修复,只需将函数实现更改为TMyClass.my_func(const text: string): string;

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-03-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-12-27
        • 1970-01-01
        相关资源
        最近更新 更多