* * *

Author Topic: [error] make cocoa x86_64 cocoawsclipboard.pas fails without {$mode objfpc}{$H+}  (Read 1260 times)

d-_-b

  • Newbie
  • Posts: 2
Followed https://macpgmr.github.io/MacXPlatform/UsingCocoaFromTrunk.html to build lazarus from source(r58701) using brew fpc(Free Pascal Compiler version 3.0.4 [2017/12/06] for x86_64) for cocoa x64.

Make gave me a error for lcl/interfaces/cocoa/cocoawsclipboard.pas so I fixed it with adding `{$mode objfpc}{$H+}` to
cocoawsclipboard.pas as in the patch below:

Code: Pascal  [Select]
  1. Index: lcl/interfaces/cocoa/cocoawsclipboard.pas
  2. ===================================================================
  3. --- lcl/interfaces/cocoa/cocoawsclipboard.pas   (revision 58701)
  4. +++ lcl/interfaces/cocoa/cocoawsclipboard.pas   (working copy)
  5. @@ -2,6 +2,7 @@
  6.  
  7.  interface
  8.  
  9. +{$mode objfpc}{$H+}
  10.  {$modeswitch objectivec2}
  11.  
  12.  uses
  13.  

Should I create a bug?

Is my patch ok, coding wise?
Code: Pascal  [Select]
  1. mov     ax,0013h
  2. int     10h
Denthor thanks for the vga programming tutorials | Download all tutorials

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2015
    • havefunsoft.com
What error do you get?
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

d-_-b

  • Newbie
  • Posts: 2
make LCL_PLATFORM=cocoa CPU_TARGET=x86_64

Gave the following errors:

Code: Pascal  [Select]
  1. Compiling cocoaint.pas
  2. Compiling cocoawsclipboard.pas
  3. cocoawsclipboard.pas(139,3) Error: Identifier not found "Result"
  4. cocoawsclipboard.pas(145,3) Error: Identifier not found "Result"
  5. cocoawsclipboard.pas(166,3) Error: Identifier not found "result"
  6. cocoawsclipboard.pas(203,5) Error: Identifier not found "try"
  7. cocoawsclipboard.pas(204,7) Fatal: Syntax error, ";" expected but "FOR" found
  8. Fatal: Compilation aborted
  9. make[3]: *** [../lcl.ppu] Error 1
  10. make[2]: *** [cocoa_all] Error 2
  11. make[1]: *** [interfaces] Error 2
  12. make: *** [lcl] Error 2

With the {$mode objfpc}{$H+} added to cocoawsclipboard.pas as in my patch above I was able to make lazarus.app.
Code: Pascal  [Select]
  1. mov     ax,0013h
  2. int     10h
Denthor thanks for the vga programming tutorials | Download all tutorials

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2015
    • havefunsoft.com
thanks for the patch. it has been applied to the trunk
Patron Cocoa Widgetset development https://www.patreon.com/skalogryz

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus