Solved: Error when compiling Zeos on Delphi 12

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
User avatar
Prometeus
Senior Boarder
Senior Boarder
Posts: 56
Joined: 29.10.2005, 01:25

Solved: Error when compiling Zeos on Delphi 12

Post by Prometeus »

Hello,

According to the attached picture, I am getting an error when compiling the 'Delphi 12' package from subversion '8051'. I think it's related to some compiling version issue, but I could not find the 'inc' file that probably needs fixing. Any tip on this?

Thanks!
2023-11-12_130021.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by Prometeus on 06.12.2023, 05:20, edited 1 time in total.
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 796
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Error when compiling Zeos on Delphi 12

Post by aehimself »

Hello,

Known issue, a hotfix is already on it's way.

More info here.
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
User avatar
Prometeus
Senior Boarder
Senior Boarder
Posts: 56
Joined: 29.10.2005, 01:25

Re: Error when compiling Zeos on Delphi 12

Post by Prometeus »

Hello aehimself,

Thanks for the info!

For some reason I received this message when I tried to read your link: "You are not authorised to read this forum."
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 796
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Error when compiling Zeos on Delphi 12

Post by aehimself »

Long story short, the issue is caused by the weak NativeInt alias introduced in Delphi 12 and the proposed solution is available as a pull request on GitHub :)
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
User avatar
Prometeus
Senior Boarder
Senior Boarder
Posts: 56
Joined: 29.10.2005, 01:25

Re: Error when compiling Zeos on Delphi 12

Post by Prometeus »

With the current fixes the first errors were gone but it failed with this error:

[dcc32 Error] ZDbcODBCStatement.pas(1961): E2251 Ambiguous overloaded call to 'Max'
ZCompatibility.pas(841): Related method: function Max(const NativeUInt; const NativeUInt): NativeUInt;
System.Math.pas(5172): Related method: function Max(const Cardinal; const Cardinal): Cardinal;

When I changed the call on line '1961' from 'Max' to 'System.Math.Max' or 'ZCompatibility.Max' it compiled without errors and installed correctly.
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 796
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Error when compiling Zeos on Delphi 12

Post by aehimself »

That modification is in the pull request as well. The "ZCompatibility." prefix mefore Max is included if NATIVEINT_WEAK_REFERENCE is defined.
Same had to be done in ZDbcOracleUtils : 1433, ZDbcInterbaseFirebirdMetaData : 2000 and ZAbstractRODataSet : 9417 as well.
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Post Reply