|
安装ZEOSLib 6.6.6 到 Lazaurs 0.9.28, 总是提示:zcore.pas(10,5) Fatal: Can't find unit ZClasses used by zcore
! 是按官方说明的方法安装的:
Installation
------------
1. Components / Open Package File (*.lpk)
2. Open Components.Lpk
4. Click Install
5. Click Yes when asked if you want to rebuild Lazarus
That's it!
---------------------------------------------------------------------------------------------------------------------------------------------
unit zcore;
interface
uses
ZClasses, ZCollections, ZCompatibility, ZExpression, ZExprParser,
ZExprToken, ZFunctions, ZMatchPattern, ZMessages, ZSysUtils, ZTokenizer,
ZVariables, ZVariant;
implementation
end.
官方还这么说,请问要做何解?
If you receive the error "Cannot find unit ZClasses" or something similar, then you need to carefully check the case of the filenames in your Zeos source distribution.
Even if the cases match exactly, the autogenerated package source file can generate the wrong case name in the uses clause (Lazarus 0.9.18), i.e.:
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}
unit Zcore;
interface
uses
Zclasses, Zcollections, Zcompatibility, Zexprparser, Zexprtoken, Zexpression,
Zfunctions, Zmatchpattern, Zmessages, Zsysutils, Ztokenizer, Zvariables,
Zvariant;
implementation
end.
Notice that Lazarus has named the unit ZClasses Zclasses, resulting in a naming conflict. Presumably this is a bug in Lazarus, not the Zeos packages. One way around this is to rename all the zeos source files to lowercase. Trawl through each subdirectory under src/ and execute this command in a bash window:
rename -v 'y/A-Z/a-z/' *
Then, in Lazarus, reopen the package (.lpk) and fix the filename cases by clicking on "More..."/"Fix Files Case"
The package should compile now. |
|