Recent

Author Topic: [SOLVED] Zeos 7.2 is not compile with FPC 2.6.4  (Read 5060 times)

patyi

  • Full Member
  • ***
  • Posts: 168
[SOLVED] Zeos 7.2 is not compile with FPC 2.6.4
« on: September 30, 2014, 01:13:14 pm »
Hi all !

Sorry I can't write for some reason to Zeos team, I hope someone is reading Lazarus forum ...

I can't compile Zeos 7.2 with FPC 2.6.4 and 2.6.5, while FPC 7.1 is fine !
« Last Edit: October 02, 2014, 02:49:00 pm by patyi »

EgonHugeist

  • Jr. Member
  • **
  • Posts: 78
Re: Zeos 7.2 is not compile with FPC 2.6.4
« Reply #1 on: September 30, 2014, 01:18:40 pm »
Works nice on my side... So what's wrong?

Why can't you write (for some reasons?) in Zeos-Forum?

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1260
Re: Zeos 7.2 is not compile with FPC 2.6.4
« Reply #2 on: September 30, 2014, 02:52:01 pm »
Works nice on my side... So what's wrong?

Same here - Oracle and MySQL connections working under windows 7 for both Lazarus 1.2.4/fpc 2.6.4 & Lazarus trunk/fpc trunk.
Lazarus Trunk/FPC Trunk on Windows [7, 10]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Zeos 7.2 is not compile with FPC 2.6.4
« Reply #3 on: September 30, 2014, 03:02:18 pm »
Why not go crazy and copy/paste the actual compile error messages from the messages window (right click, copy all shown or something)...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

patyi

  • Full Member
  • ***
  • Posts: 168
Re: Zeos 7.2 is not compile with FPC 2.6.4
« Reply #4 on: October 01, 2014, 08:28:44 am »
Sorry, i was in hurry, tired and a little frustrated ...

So, my system is XUbuntu 14.04 LTS 32bit, Fpc 2.6.5 svn, Lazarus 1.3 svn
This error is not present on Fpc 2.7.1 !

Compiling with Fpc 2.6.5 is produce an error in fallowing code :

in Unit ZEncoding
Code: [Select]

function PUnicodeToRaw(Source: PWideChar; CodePoints: NativeUInt; CP: Word): RawByteString;
{$IFDEF WITH_LCONVENCODING}
var
  US: ZWideString;
begin
  SetString(US, Value.P, Value.Len);  <--- Here is the error "Identifier not found Value"
  Result := ZUnicodeToRaw(US, CP);
end;
{$ELSE}
{$IF defined(MSWINDOWS) or defined(WITH_UNICODEFROMLOCALECHARS)}
var
  ulen: Integer;
{$IFEND}
begin
  Result := ''; //speed up setlength *2
 ...
if modify call of function from  SetString(US, Value.P, Value.Len); to  SetString(US, Source, CodePoints); then it compiles, but I don't know is it correct.
« Last Edit: October 02, 2014, 12:27:15 pm by patyi »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Zeos 7.2 is not compile with FPC 2.6.4
« Reply #5 on: October 01, 2014, 08:37:16 am »
Thanks but please post code between [ code ] [ /code ]tags (remove the extra spaces); as you can see the forum software misinterprets your code as smileys...

Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

EgonHugeist

  • Jr. Member
  • **
  • Posts: 78
Re: Zeos 7.2 is not compile with FPC 2.6.4
« Reply #6 on: October 01, 2014, 10:55:50 am »
Quote from: patyi
f modify call of function from  SetString(US, Value.P, Value.Len); to  SetString(US, Source, CodePoints); then it compiles, but I don't know is it correct.

Of course it is! -> Patch done R3355 \testing-7.2 (svn)

Thanks!

I still do not understand why you do not post on zeos-forum...  :o

patyi

  • Full Member
  • ***
  • Posts: 168
Re: Zeos 7.2 is not compile with FPC 2.6.4
« Reply #7 on: October 02, 2014, 12:20:23 pm »
Hi !

Thanks EgonHugeist ! I found one more little problem, below is the cod segment and the solution:

unit ZDbcCache
Code: [Select]

function CompareNativeRaw(const V1, V2): Integer;
begin
  {$IFDEF MSWINDOWS}
  Result := CompareStringA(LOCALE_USER_DEFAULT, 0,
    PAnsiChar(Pointer(V1)^)+PAnsiInc, PLongWord(Pointer(V1)^)^,
    PAnsiChar(Pointer(V2)^)+PAnsiInc, PLongWord(Pointer(V2)^)^) - 2{CSTR_EQUAL}
  {$ELSE}
    if Assigned(PPAnsichar(Pointer(V1)^) and Assigned(PPAnsiChar(Pointer(V2)^) then  <--- ZDbcCache.pas(441,80) Fatal: Syntax error, ")" expected but "THEN" found
      Result := {$IFDEF WITH_ANSISTRCOMP_DEPRECATED}AnsiStrings.{$ENDIF}
        AnsiStrComp(PPAnsiChar(V1)^+PAnsiInc, PPAnsiChar(V2)^+PAnsiInc)
    else //we've found out on other (FPC)OS's a nil compare crahs!
      if not Assigned(PPAnsichar(Pointer(V1)^) and not Assigned(PPAnsiChar(Pointer(V1)^) then <--- ZDbcCache.pas(445,92) Fatal: Syntax error, ")" expected but "THEN" found
        Result := 0
      else
        Result := -1
  {$ENDIF}
end;
the solution is to add ")" to the end of Assigned functions.

Regards, Patyi.

PS. I lost (forget) my Zeos forum password, and can't get it because my email is changed from patyi@_.yu to patyi@_.rs. I will open a new Zeos account ... 
« Last Edit: October 02, 2014, 12:26:38 pm by patyi »

patyi

  • Full Member
  • ***
  • Posts: 168
Re: Zeos 7.2 is not compile with FPC 2.6.4
« Reply #8 on: October 02, 2014, 01:39:01 pm »
Now I'm again on Zeos forum ...  :D

 

TinyPortal © 2005-2018