Page 1 of 2
[patch_done] Zeos7 doesnt compile under FPC2.6.0
Posted: 02.01.2012, 08:00
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
Posted: 02.01.2012, 11:35
by papelhigienico
Are you using a fresh copy of Zeos? (latest revision of SVN)
Posted: 02.01.2012, 17:58
by IndianaJones
Which revision are you talking, revision 966, and which directory are you using? Still gives error.
Thanks.
Posted: 02.01.2012, 18:23
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.
Posted: 02.01.2012, 19:32
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
Posted: 02.01.2012, 19:59
by papelhigienico
You solved the previous error?
Posted: 02.01.2012, 20:38
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.
Posted: 10.01.2012, 22:26
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
Posted: 14.01.2012, 12:49
by papelhigienico
I'll install a clean Ubuntu installation with FPC 2.6 and test it.
Posted: 15.01.2012, 17:20
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).
Posted: 16.01.2012, 14:47
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.
Posted: 16.01.2012, 15:10
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"
Posted: 16.01.2012, 15:46
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)
Posted: 16.01.2012, 16:12
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.
Posted: 16.01.2012, 16:24
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