uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Grids, DBGrids, Db, DBTables, StdCtrls, StrUtils;[Fatal Error] detail.pas(7): File not found: 'StrUtils.dcu'

解决方案 »

  1.   

    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs,strutils, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    begin
      showmessage(leftstr('hello world',4));
    end;end.---------------------------
    Project1
    ---------------------------
    hell
    ---------------------------
    OK   
    ---------------------------
      

  2.   

    看看这个文件夹下是否有StrUtils.dcu文件
    C:\Program Files\Borland\Delphi7\Lib
    如果有检查一下
    tools-〉Environment options->library里是否有
    $(DELPHI)\Lib
      

  3.   

    delphi5中没有StrUtils.dcu吧 有办法在D5中使用leftstr等函数吗?
      

  4.   

    Delphi中有StrUtils这个单元的源代码(StrUtils.pas), 复制到Delphi5中能用。
      

  5.   

    你还是直接使用copy函数吧,原理一样的