Solution for ZEOS 6.6.6 with >= FPC2.5.x

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

Solution for ZEOS 6.6.6 with >= FPC2.5.x

Post by mmvisual »

Hello,
I have change to FPC 2.5.1 and then I cannot install the componente V6.6.6, there comes a error.

Then I have change in the File "ZClasses.pas" the lines:
TContainedObject = class(TAggregatedObject, IInterface)
protected
function QueryInterface({$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} iid : tguid;out obj) : longint;{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
// function QueryInterface(const IID: TGUID; out Obj): HResult; virtual; stdcall;
end;

and here:
function TContainedObject.QueryInterface({$IFDEF FPC_HAS_CONSTREF}constref{$ELSE}const{$ENDIF} iid : tguid;out obj) : longint;{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
//function TContainedObject.QueryInterface(const IID: TGUID; out Obj): HResult;
begin
if GetInterface(IID, Obj) then
Result := S_OK
else
Result := E_NOINTERFACE;
end;

Now, it works fine.
In atachment the corrected file.

@Admin: Can you generate a Release V6.6.7, that works with FPC 2..5.x?

Thanks, Markus.
You do not have the required permissions to view the files attached to this post.
Wild_Pointer
Expert Boarder
Expert Boarder
Posts: 164
Joined: 18.03.2008, 13:03
Contact:

Post by Wild_Pointer »

Hello, mmvisual,

there's already a topic about the problem of FPC >= 2.5. http://zeos.firmos.at/viewtopic.php?t=3 ... hlight=fpc Have you read it?

Also have you tried compiling zeos lib on lower FPC version with your changes applied. Is it backwards compatible?
Didn't you have to also change _AddRef and _Release methods ?

Good luck!
mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

Post by mmvisual »

Hello,

Sorry, I have not read the thread.

I have test it with:

- Lazarus-0.9.29-28634-fpc-2.4.2-20101206-win32.exe
- Lazarus-0.9.31-28871-fpc-2.5.1-20110106-win32.exe

With both versions work my change correct. No other change is required.

If you can german, vou can read here:
http://www.lazarusforum.de/viewtopic.php?p=43969#p43969
This was my first installation with the new FPC and I have correct the Zeos-Mistake in 5 minutes. I want not read a lot of threads, what I can correct self in this short time.

Regards, Markus
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

mmvisual,
Can you check the changes needed to the zclasses file I attach to this post? That's the version in the 6.6 branch right now.
Did you also test on linux?

Mark
You do not have the required permissions to view the files attached to this post.
Image
mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

Post by mmvisual »

I have correct the file an test. It have not work with my Linux-Test.

The Test:
Windows + FPC2.4.2 + L0.9.29 > OK (MySQL)
Windows + FPC2.5.1 + L0.9.31 > OK (MySQL)
Linux + FPC2.4.2 + L0.9.29 > OK (SQLite)

It need a test with Linux and FPC >= 2.5.0.

Here the File:
You do not have the required permissions to view the files attached to this post.
Wild_Pointer
Expert Boarder
Expert Boarder
Posts: 164
Joined: 18.03.2008, 13:03
Contact:

Post by Wild_Pointer »

mdaems,

in line 218 of the file you send is a line

Code: Select all

function TAggregatedObject._Release: Integer; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
Do you know why is it there? I meen the calling directives. mmvisual removed them and I think the source is better now. On the other hand if they are needed for some reason, then they should be copied from the declaration.
mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

Post by mmvisual »

Hello,

My changes from Posted: 14.01.2011, 10:46 woking with FPC2.5.1/Laz0.9.31 with Linux correct, I have test it today.

@mdaems
You can make a new release V6.6.7

Markus
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Committed to rev. 877 and 878

Now I hope lots of people try the preview of 6.6.7 I uploaded to the snapshot server.

Mark
Image
mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

Post by mmvisual »

I have installed a new linux, then I have found a new problem. After installing all, I have want made a test mit MySQL. In Ubuntu, I have must install:

sudo apt-get install mysql-client

After this installation was there in "/usr/lib/" the file "libmysqlclient.so.16" but the ZEOS Component want have "libmysqlclient.so.15".

I have add this file into "ZPlainMySql5.pas", see attachment. Line 83, 593.

(Or you can make a new link with
ls -s /usr/lib/libmysqlclient.so.16 /usr/lib/libmysqlclient.so.15
then ist works with the old zeos, too)

But I think it was better, when you can make this small change into 6.6.7.

Markus.
You do not have the required permissions to view the files attached to this post.
mmvisual
Senior Boarder
Senior Boarder
Posts: 51
Joined: 13.10.2010, 14:55

Post by mmvisual »

@mdaems
can you make a new ZIP-Download "V6.6.7alpha" on this side?
http://zeos.firmos.at/portal.php

And open a new forum section "V6.6.7"?

Then I think more users can write here thinks and help to make a V6.6.7.

Thank you very much,
Markus
tintinux
Junior Boarder
Junior Boarder
Posts: 44
Joined: 19.05.2010, 10:39

Post by tintinux »

After this installation was there in "/usr/lib/" the file "libmysqlclient.so.16" but the ZEOS Component want have "libmysqlclient.so.15".
Hi,

This issue was already raised and corrected.
See this post.

Regards,
Tintinux
tintinux
Junior Boarder
Junior Boarder
Posts: 44
Joined: 19.05.2010, 10:39

Post by tintinux »

Now I hope lots of people try the preview of 6.6.7 I uploaded to the snapshot server
Yes, I would like to try... but where can we find it ?
Thanks
Tintinux
Alex Rosa
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 21.03.2012, 15:51
Location: Porto Alegre, Brazil
Contact:

Post by Alex Rosa »

tintinux wrote:Yes, I would like to try... but where can we find it ?
Thanks
Tintinux
http://zeosdownload.firmos.at/downloads ... stable.zip
tintinux
Junior Boarder
Junior Boarder
Posts: 44
Joined: 19.05.2010, 10:39

Post by tintinux »

Hi

Thanks for the link. It is never too late...

I have just tried with Lazarus 0.9.30.4 and FPC 2.6 on Windows.

There are compilation errors in ZClasses.pas

G:\Lazarus\Tiers\Zeos\preview-ZEOSDBO-6.6.7-stable\src\core\ZClasses.pas(90,22) Error: No matching implementation for interface method "IUnknown.QueryInterface(constref TGuid,out <Formal type>):LongInt; StdCall;" found
G:\Lazarus\Tiers\Zeos\preview-ZEOSDBO-6.6.7-stable\src\core\ZClasses.pas(194,14) Warning: An inherited method is hidden by "TZAbstractObject.Equals(const IUnknown):Boolean;"
G:\Lazarus\Tiers\Zeos\preview-ZEOSDBO-6.6.7-stable\src\core\ZClasses.pas(197,14) Warning: An inherited method is hidden by "TZAbstractObject.ToString:AnsiString;"
G:\Lazarus\Tiers\Zeos\preview-ZEOSDBO-6.6.7-stable\src\core\ZClasses.pas(201,1) Fatal: There were 1 errors compiling module, stopping

I have read that there were changes in FPC 2.6... but I can't find more information.

:twisted:

Regards,
Tintinux
msv
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 26.06.2012, 12:11

Post by msv »

Just wanted to post and say that the first post plus adding the following to my zeos.inc file allowed me to compile 7.0.0-alpha using Lazarus v.0.90.4 (which uses FPC 2.6) on my Mac.

Code: Select all

{$IFDEF VER2_6}
    {$DEFINE FPC2_3UP}
    {$DEFINE FPC2_2UP}
    {$DEFINE FPC2_1UP}
  {$ENDIF}
Post Reply