读书人

小弟我要使用LeftStr等函数 所以在use

发布时间: 2012-02-22 19:36:56 作者: rapoo

我要使用LeftStr等函数 所以在uses中增加了StrUtils 为什么还是报错啊?我把USES和出错贴了出来,请大家帮我看下,谢谢。
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'



[解决办法]

Delphi(Pascal) code
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   ---------------------------
[解决办法]
看看这个文件夹下是否有StrUtils.dcu文件
C:\Program Files\Borland\Delphi7\Lib
如果有检查一下
tools-〉Environment options->library里是否有
$(DELPHI)\Lib
[解决办法]
Delphi中有StrUtils这个单元的源代码(StrUtils.pas), 复制到Delphi5中能用。

读书人网 >.NET

热点推荐