Solution for ZEOS 6.6.6 with >= FPC2.5.x
Moderators: gto, EgonHugeist
Solution for ZEOS 6.6.6 with >= FPC2.5.x
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.
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.
-
- Expert Boarder
- Posts: 164
- Joined: 18.03.2008, 13:03
- Contact:
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!
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!
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
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
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:
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.
-
- Expert Boarder
- Posts: 164
- Joined: 18.03.2008, 13:03
- Contact:
mdaems,
in line 218 of the file you send is a line 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.
in line 218 of the file you send is a line
Code: Select all
function TAggregatedObject._Release: Integer; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
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.
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.
@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
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
http://zeosdownload.firmos.at/downloads ... stable.ziptintinux wrote:Yes, I would like to try... but where can we find it ?
Thanks
Tintinux
Alexsander
http://rednaxel.com
http://rednaxel.com
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.
Regards,
Tintinux
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.
Regards,
Tintinux
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}