[patch_done] Zeos7 doesnt compile under FPC2.6.0

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

IndianaJones
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 20.10.2009, 16:11

[patch_done] Zeos7 doesnt compile under FPC2.6.0

Post by IndianaJones »

Here is the error while compile components.

ZEOSDBO-7/src/core/ZClasses.pas(84,22) Error: No matching implementation for interface method "IUnknown.QueryInterface(constref TGuid,out <Formal type>):LongInt; CDecl;" found
Last edited by IndianaJones on 27.01.2012, 13:26, edited 1 time in total.
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

Are you using a fresh copy of Zeos? (latest revision of SVN)
IndianaJones
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 20.10.2009, 16:11

Post by IndianaJones »

Which revision are you talking, revision 966, and which directory are you using? Still gives error.
Thanks.
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

yes, revision 966 from /branches/testing

Are you using Linux or Windows? I'm using Zeos7 + FPC 2.7.1 + Linux and everything works fine.
IndianaJones
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 20.10.2009, 16:11

Post by IndianaJones »

I am using MacOS X, and it gives the following error.

/zeoslib/branches/testing/src/component/ZPropertyEditor.pas(1,1) Fatal: Can't find unit ZDbcIntfs used by ZPropertyEditor
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

You solved the previous error?
IndianaJones
Fresh Boarder
Fresh Boarder
Posts: 15
Joined: 20.10.2009, 16:11

Post by IndianaJones »

The first error comes from the Zeos7.0 zip file, if trunk is used then the next one comes. I copied the missing file and files but I think that there are some files missing in the /branches/testing or missing {IFDEF} definitions.
Another think is Zeos6.6.6 works fine with 2.4.4 on Mac OS X. And I think that this should be fixed in the new release.
slai
Senior Boarder
Senior Boarder
Posts: 53
Joined: 07.07.2006, 10:45
Location: office

Post by slai »

Is this Problem already solved? i was trying to compile zeos from testing/trunk today and it failed with the same error:

ZEOSDBO-7/src/core/ZClasses.pas(84,22) Error: No matching implementation for interface method "IUnknown.QueryInterface(constref TGuid,out <Formal type>):LongInt; CDecl;" found

thx for answers
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

I'll install a clean Ubuntu installation with FPC 2.6 and test it.
marcov
Senior Boarder
Senior Boarder
Posts: 95
Joined: 24.06.2010, 09:17

Post by marcov »

The problem is that compatibility features for old FPC's (before the 2.4.0 series) are wrong for current versions.

For 2.4.2, 2.4.4 and 2.6.0 this is easy, just delete the ifdef fpc block in zclasses (which IMHO should be done anyway).
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

I don't know what's happens. I tested here (Ubuntu Linux 11.04 32bits) with FPC 2.6 and it compiles fine..

I'll check what's wrong with your installation.
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

Can you see if UNIX is defined? If not, I need make some changes.

Check this on Lazarus at menu Tools->CodeTools Define Editor.

Check on "Free Pascal compiler" if it has a subitem called "Define UNIX". If not check if it has a define like "Define MacOS"
marcov
Senior Boarder
Senior Boarder
Posts: 95
Joined: 24.06.2010, 09:17

Post by marcov »

It indeed compiles for me on Windows (using trunk). Maybe I looked in a wrong branch before. I do get a few warnings:

Code: Select all

ZClasses.pas(189,14) Warning: An inherited method is hidden by "TZAbstractObject.Equals(const IUnknown):Boolean;"
ZClasses.pas(190,35) Warning: An inherited method is hidden by "TZAbstractObject.GetHashCode:LongInt;"
ZClasses.pas(192,14) Warning: An inherited method is hidden by "TZAbstractObject.ToString:AnsiString;"
"UNIX" is automatically defined on a unixy OS (FreeBSD,Solaris,Haiku,Linux,Mac OS X)
papelhigienico
Expert Boarder
Expert Boarder
Posts: 113
Joined: 06.10.2006, 14:41
Location: Chapecó - Santa Catarina
Contact:

Post by papelhigienico »

marcov wrote: "UNIX" is automatically defined on a unixy OS (FreeBSD,Solaris,Haiku,Linux,Mac OS X)
Yes, I presume that UNIX is defined for a lot of OSes, including Mac OS X. But looking at the source, it's the unique thing that can be wrong (or undefined)

Or here, has something that are doing FPC understand some macros.
marcov
Senior Boarder
Senior Boarder
Posts: 95
Joined: 24.06.2010, 09:17

Post by marcov »

The difference is that FPC 2.5.1/2.6.0+ changed the definition of queryinterface.

This because Delphi definition is not welldefined enough (specially if const is mandatory by reference or just happens to be that way on x86).

Note the "constref" in the definition of the errormessage of the first post:

http://wiki.freepascal.org/User_Changes ... en_changed
Locked