装上EhLib3控件之后,报如下错误:
Build
[Warning] DBSumLst.pas(89): Unsafe type 'TBook'
[Warning] DBSumLst.pas(252): Unsafe typecast of 'Integer' to 'TObject'
[Warning] DBSumLst.pas(431): Unsafe type 'Pointer'
[Warning] DBSumLst.pas(488): Unsafe type 'TBook'
[Error] DBSumLst.pas(501): Undeclared identifier: 'Null'
[Warning] DBSumLst.pas(513): Unsafe type 'ABookMark: Pointer'
[Warning] DBSumLst.pas(514): Unsafe type 'ABookMark: Pointer'
[Warning] DBSumLst.pas(515): Unsafe type 'Pointer'
[Error] DBSumLst.pas(556): Undeclared identifier: 'Null'
[Warning] DBSumLst.pas(576): Unsafe type 'TBook'
[Warning] DBSumLst.pas(576): Unsafe type 'TBook'
[Warning] DBSumLst.pas(584): Unsafe type 'TBook'
[Warning] DBSumLst.pas(584): Unsafe type 'TBook'
[Warning] DBSumLst.pas(591): Unsafe type 'TBook'
[Warning] DBSumLst.pas(591): Unsafe type 'TBook'
[Warning] DBSumLst.pas(593): Unsafe type 'Pointer'
[Warning] DBSumLst.pas(652): Unsafe type 'TBook'
[Warning] DBSumLst.pas(777): Unsafe type 'TBook'
[Warning] DBSumLst.pas(785): Unsafe type 'TBook'
[Warning] DBSumLst.pas(807): Unsafe type 'TBook'
[Warning] DBSumLst.pas(817): Unsafe type 'TBook'
[Warning] DBSumLst.pas(817): Unsafe type 'Book: Pointer'
[Warning] DBSumLst.pas(824): Unsafe type 'TBook'
[Warning] DBSumLst.pas(824): Unsafe type 'Book: Pointer'
[Warning] DBSumLst.pas(831): Unsafe type 'TBook'
[Warning] DBSumLst.pas(831): Unsafe type 'Book: Pointer'
[Fatal Error] DBGridEh.pas(27): Could not compile used unit 'DBSumLst.pas'不知道为何,请指教。
Build
[Warning] DBSumLst.pas(89): Unsafe type 'TBook'
[Warning] DBSumLst.pas(252): Unsafe typecast of 'Integer' to 'TObject'
[Warning] DBSumLst.pas(431): Unsafe type 'Pointer'
[Warning] DBSumLst.pas(488): Unsafe type 'TBook'
[Error] DBSumLst.pas(501): Undeclared identifier: 'Null'
[Warning] DBSumLst.pas(513): Unsafe type 'ABookMark: Pointer'
[Warning] DBSumLst.pas(514): Unsafe type 'ABookMark: Pointer'
[Warning] DBSumLst.pas(515): Unsafe type 'Pointer'
[Error] DBSumLst.pas(556): Undeclared identifier: 'Null'
[Warning] DBSumLst.pas(576): Unsafe type 'TBook'
[Warning] DBSumLst.pas(576): Unsafe type 'TBook'
[Warning] DBSumLst.pas(584): Unsafe type 'TBook'
[Warning] DBSumLst.pas(584): Unsafe type 'TBook'
[Warning] DBSumLst.pas(591): Unsafe type 'TBook'
[Warning] DBSumLst.pas(591): Unsafe type 'TBook'
[Warning] DBSumLst.pas(593): Unsafe type 'Pointer'
[Warning] DBSumLst.pas(652): Unsafe type 'TBook'
[Warning] DBSumLst.pas(777): Unsafe type 'TBook'
[Warning] DBSumLst.pas(785): Unsafe type 'TBook'
[Warning] DBSumLst.pas(807): Unsafe type 'TBook'
[Warning] DBSumLst.pas(817): Unsafe type 'TBook'
[Warning] DBSumLst.pas(817): Unsafe type 'Book: Pointer'
[Warning] DBSumLst.pas(824): Unsafe type 'TBook'
[Warning] DBSumLst.pas(824): Unsafe type 'Book: Pointer'
[Warning] DBSumLst.pas(831): Unsafe type 'TBook'
[Warning] DBSumLst.pas(831): Unsafe type 'Book: Pointer'
[Fatal Error] DBGridEh.pas(27): Could not compile used unit 'DBSumLst.pas'不知道为何,请指教。
EhLib 使用教程:EhLib 安装
作者: Faceker @2007-08-20 11:33:26
20 8
在发布了最新的 EhLib 4.2.12 中文汉化版以后,在盒子的评论区有人问安装的问题,其实在以前发布 EhLib 3.4、3.6、4.1 汉化修改版时,EhLib 的安装也是评论区问得最多的问题。
这并不是 EhLib 本身的问题,而是很多人不了解 Delphi 组件的安装方法所造成的。EhLib 的安装相对 DevExpress 系列、FastReport 的安装来说已经是非常简单的了。
此篇 EhLib 使用教程简单描述一下 EhLib 的安装方法。
EhLib 在 Delphi 7 下的安装方法:
1、将 EhLib 解压到一个目录,如:E:\VCL\EhLib;
2、将 EhLib 安装目录下 Common 目录与DataService 目录下的所有文件拷贝到 EhLib 安装目录下的 Delphi 7 目录(有原文件的不能替换——ycs);
3、启动 Delphi 7;
4、选择 File — Open Project,跳转到 EhLib 安装目录,在出现的打开文件对话框文件类型下拉列表中选择 Delphi Package(*.dpk;*.dpkw),在文件列表中选择 EhLib70.dpk 打开,然后在出现的 Package 窗口中点击按钮 Compile,编译此包(只需要编辑就可以了,不能点安装——ycs);
5、按照上一步相同的方法打开 DclEhLib70.dpk,点击 Compile(编辑) ,然后再点击 Install(安装) ,安装此设计时包;
6、打开 Delphi 菜单-Tools-Environment Options-Library(库)-Library Path(库路径),将 EhLib 安装目录下的 Delphi 7 目录添加到库搜索路径中,本例中该路径是 E:\VCL\EhLib\Delphi7。
至此,EhLib 在 Delphi 7 下即安装成功,在关闭上述打开的包文件时,会提示是否保存,在此处选择否,不保存。
EhLib 在 Delphi 5、Delphi 6、Delphi 8 下依上述方法都可正确安装。
EhLib 在 Delphi 2007、Delphi 2006 下的安装步骤跟上述也完全相同,不同在于他们新添加了两个包,按照上述第 4 步指示方法安装 EhLibDataDrivers110.dpk、按照第 5 步所示方法安装 DclEhLibDataDrivers110.dpk 即可。
安装 Delphi 组件,其实就是安装扩展名为 .dpk 的 Package 包文件,一般包分为运行时包和设计时包,运行时包打开后编译即可;设计时包一般以 Dcl 为包名前缀,设计时包不但需要编译,同时还需要安装才可出现在 Delphi 组件面板上,其它组件如 FastReport 按照此原则都可正确安装。
注:EhLib 最新版 4.2.12 中文汉化版可以在 Delphi 盒子下载。