Page 1 of 1

Path to 6.6.6-stable - "constref" FPC 2.5.1

Posted: 22.10.2010, 14:03
by mdbs99
Hi,
Because this http://wiki.freepascal.org/User_Changes ... en_changed

...I could not compile my Lazarus. So, in attachment is a path to ZClasses.pas

This path is to 6.6.6-stable version.

Marcos Douglas

Posted: 17.11.2010, 03:11
by papelhigienico
Hi Marcos!

What's the version of your compiler that you used to do this changes? Now, I can't compile ZeosLib on Linux with latest FPC version, so, now I'm creating other patch to solve my problem without creating others to you...

Regards,

Fabio

Posted: 17.11.2010, 11:47
by mdbs99
Hi Fabio,
I used the last version of trunk (FPC 2.5.1). See the title...

Marcos Douglas

Posted: 17.11.2010, 18:02
by papelhigienico
Sorry, when I wrote the previous post at near of 01:30AM (so I was sleeping).

I see that my version of FPC old if compared with your FPC version, so I updated it.

I'll provide a patch to get it compiling on linux again...

Posted: 26.11.2010, 22:57
by marcov
(2.5.1 is the development version. 2.4.2 is the last release, two weeks old now.)

Posted: 26.11.2010, 23:51
by mdaems
marcov,
Can you have a short look at the patch, please? Just to check if the changes seem correct.
Th {$IFDEF FPC_HAS_CONSTREF} thing should keep the code backward compatible, I think, but I'm not sure of the other small changes are safe.

Mark

zeos does not compile on FPC 2.4 anymore

Posted: 27.11.2010, 22:17
by Wild_Pointer
Hello,

the change applied may be ok for FPC 2.5, but for FPC 2.4 it raises exception when compiling. Attaching patch that should fix the problem.

Posted: 05.12.2010, 21:20
by mdaems
Wild_Pointer,
What about the patches by papelhienico posted in the bug tracker, are they allright?
I did commit his patches earlier today (to testing branch). Is your patch above still needed?

What worries me about your post is this part:

Code: Select all

{$IFDEF FPC2_5UP}{$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF}{$ELSE}stdcall{$ENDIF}
Does that mean fpc <2.5 on linux doesn't use 'cdecl'?

Mark

Posted: 06.12.2010, 07:56
by Wild_Pointer
Hello, mdaems,

I'm using Lazarus 0.9.28.2-10Ubuntu1, FPC v2.4.0

objpash.inc contains declaration:

Code: Select all

       IUnknown = interface
         ['{00000000-0000-0000-C000-000000000046}']
         function QueryInterface(const iid : tguid;out obj) : longint;stdcall;
         function _AddRef : longint;stdcall;
         function _Release : longint;stdcall;
       end;
       IInterface = IUnknown; 
UODATE:
I have updated to initial (1) objpash.inc revision from fpc repository - seems that interface definition has not been changed till version 2.4.0
END OF UPDATE.

I have tried compiling zeos trunk version, but I failed, so I had to change the code. Maybe fpc <2.5 on linux does use 'cdecl', but not with IInterface ... I didn't come with anything more elegant than this {$IFDEF FPC2_5UP}.
What about the patches by papelhienico posted in the bug tracker, are they allright?
I think the change made by papelhienico is valid only to FPC >= 2.5

Posted: 09.10.2011, 21:01
by papelhigienico
This issue has been fixed? The latest zeos revision works on FPC 2.4.x on linux? I'm testing on

FPC 2.4.4 windows
FPC 2.5.1 linux
FPC 2.2.4 linux

FPC 2.4.x I can't test zeos

Posted: 21.03.2012, 15:54
by Alex Rosa
Is there a plan to release a 6.6.7 with these fixes? On Linux I managed to get it working on FPC 2.6.0 with changes to ZClasses.pas (extra IFDEFs) and Zeos.inc (extra DEFINEs). Marcos tested it on Windows.

Posted: 25.04.2012, 22:25
by mdaems
Alex Rosa,
Do you think you can get this working correctly for old and new fpc compilers on the 6.6.7 branch?

I can't promise a 6.6.7 build within a few days, but if you can provide a working patch we can commit it. And after that I can start thinking about making another try of a 6.6.7 build.

Mark