首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

小弟我要使用LeftStr等函数 所以在uses中增加了StrUtils 为什么还是报错啊小弟我把USES和出错贴了出来,请大家帮小弟我看下,多谢

2012-02-22 
我要使用LeftStr等函数 所以在uses中增加了StrUtils 为什么还是报错啊?我把USES和出错贴了出来,请大家帮我

我要使用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中能用。

热点排行