Page 1 of 1

How to install Zeoslib on Delphi XE?

Posted: 11.10.2010, 19:15
by joanmvf
Can someone provide a step by step manual how to install zeoslib on Delphi XE? because i have seem some post with patch and things, but none of them work to me..

I get some errors all the time.

This is one of them.

[DCC Error] ZSysUtils.pas(454): E2010 Incompatible types: 'PAnsiChar' and 'PWideChar'

Posted: 11.10.2010, 20:13
by marcov
Start by explaining what you exact downloaded?

Did you check out svn://zeos.firmos.at/zeos/branches/testing ?

Posted: 11.10.2010, 22:51
by joanmvf
Yep... i got that one....

Posted: 09.06.2011, 04:10
by sastropawiro
Well it happens with me too, while i try to build zeosdbo-7.0.0-alpha with my delphi xe it says [DCC Error] ZSysUtils.pas(454): E2010 Incompatible types: 'PAnsiChar' and 'PWideChar' in ZSysUtils.pas in this code

function StartsWith(const Str, SubStr: string): Boolean;
var
LenSubStr: Integer;
begin
LenSubStr := Length(SubStr);
if SubStr = '' then
Result := True
else if LenSubStr <= Length(Str) then
//Result := Copy(Str, 1, Length(SubStr)) = SubStr;
{$IFDEF DELPHI12_UP}
Result := MemLCompUnicode(PChar(Str), PChar(SubStr), LenSubStr)
{$ELSE}
Result := MemLCompAnsi(PChar(Str), PChar(SubStr), LenSubStr)
{$ENDIF}
else
Result := False;
end;

and this code

function EndsWith(const Str, SubStr: string): Boolean;
var
LenSubStr: Integer;
LenStr: Integer;
begin
if SubStr = '' then
Result := False // act like Delphi's AnsiEndsStr()
else
begin
LenSubStr := Length(SubStr);
LenStr := Length(Str);
if LenSubStr <= LenStr then
//Result := Copy(Str, LenStr - LenSubStr + 1, LenSubStr) = SubStr
{$IFDEF DELPHI12_UP}
Result := MemLCompUnicode(PChar(Pointer(Str)) + LenStr - LenSubStr,
Pointer(SubStr), LenSubStr)
{$ELSE}
Result := MemLCompAnsi(PChar(Pointer(Str)) + LenStr - LenSubStr,
Pointer(SubStr), LenSubStr)

{$ENDIF}
else
Result := False;
end;
end;

the ZPlainMySqlConstants.pas has [DCC Error] ZPlainMySqlConstants.pas(229): E2003 Undeclared identifier: 'UInt' error

in line MYSQL_FIELD_OFFSET = UInt;

the ZGenericSqlToken.pas has [DCC Error] ZGenericSqlToken.pas(206): E2003 Undeclared identifier: 'ttTime' error

in line
// Time constant
if (CountDoublePoint = 2) and (CountSlash = 0) then
begin
try
Result.Value := DecodeString(Result.Value,'"');
Result.TokenType := ttTime;
except
end;

i think it seems the component has not done yet, well may be any one who develop the zeosdbo will fix it as soon as possible, since this component is very use full, and help a lot of programmers :)

sorry if my english is bad

Posted: 09.06.2011, 19:13
by Lidael
sastropawiro wrote: {$IFDEF DELPHI12_UP}
Result := MemLCompUnicode(PChar(Str), PChar(SubStr), LenSubStr)
{$ELSE}
Result := MemLCompAnsi(PChar(Str), PChar(SubStr), LenSubStr)
{$ENDIF}
It seems that the define DELPHI12_UP is not correctly set. This should happen normally with the Zeos.inc file. If i can remember correctly i got something similiar and manually putting a {$DEFINE VER220} in the Zeos.inc file helped.

Posted: 10.06.2011, 04:50
by meltoywerks
Try this

http://www.silverpointdevelopment.com/m ... /index.htm

[Package - ZeosDBO 7.0.0 Alpha]
Name=ZEOSDBO-7.0.0
Zip=ZEOSDBO-7.0.0-alpha.zip
Folder=zeos
SearchPath="src\component","src\core","src\dbc", "src\parsesql", "src\plain"
Includes="$BaseFolder\src\component","$BaseFolder\src\core","$BaseFolder\src\dbc","$BaseFolder\src\parsesql","$BaseFolder\src\plain"
;GroupIndex=1
D14="packages\delphi14\ZCore.dpk", "packages\delphi14\ZPlain.dpk", "packages\delphi14\ZParseSql.dpk", "packages\delphi14\ZDbc.dpk","packages\delphi14\ZComponent.dpk", "packages\delphi14\ZComponentDesign.dpk"

code worked for me! EXCELLENT!

Posted: 10.06.2011, 12:04
by mrLion
meltoywerks, atest version does not work with Delphi XE I had to edit and recompile the source code. Sorry message on russian :)

Posted: 12.06.2011, 11:52
by ism
I install in Delphi XE package from directory

zeos_svn\packages\delphi10

all install ok, does not require modification