Recent

Author Topic: [Solved] Linking error, missing Cocoa on macOS  (Read 853 times)

ddabrahim

  • New Member
  • *
  • Posts: 11
[Solved] Linking error, missing Cocoa on macOS
« on: October 10, 2021, 11:11:50 am »
Hi.

I'm running macOS 11.6.
I have installed Xcode command line tools
I have installed Xcode IDE (I know it is not required but I have it installed)
I have installed Free Pascal Compiler 3.2.2
I have installed fpc-sources-3.2.2
I have installed Lazarus IDE 2.0.12

When I first launched Lazarus I did set the path to FPC and FPC sources and everything reported OK.
However, when I create any type of projects in Lazarus and try to compile and run,  I get "Linking Error" with no further explanation or in case of GUI application it is reporting that Cocoa is missing.

Could anyone please help me to figure out what the problem is? I am new to Lazarus, I'v been using Pascal many years ago on Windows XP so my knowledge is pretty out dated and not sure what to do about this error.
I searched online, it seems for some people it was caused by the Xcode command line tools being out of date, however I have received an update just this morning and it is still not working.

I'm not sure what else I could do to get it working.
I was considering also to completely uninstall Lazarus and Free Pascal and try it again, maybe because the command line tools were out of date something went wrong at the installation. But I am also uncertain how to completely uninstall Lazarus and Free pascal.

I would appreciate any help. Thank you.
« Last Edit: October 10, 2021, 12:11:57 pm by ddabrahim »

ddabrahim

  • New Member
  • *
  • Posts: 11
Re: [Solved] Linking error, missing Cocoa on macOS
« Reply #1 on: October 10, 2021, 12:14:03 pm »
My mistake. I have installed the wrong FPC version, did not pay attention 3.2.0 is the recommended for Lazarus 2.0.12. Installing version 3.2.0 did solve the problem and now I can compile and run.

 

TinyPortal © 2005-2018