Recent

Author Topic: ld: library not found for -lc  (Read 4596 times)

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: ld: library not found for -lc
« Reply #15 on: December 15, 2022, 10:06:52 pm »
It means "pass this parameter to the compiler". See e.g. the first post in this thread, where TomAylesworth executes fpc SphericalHouses.pas in a Terminal window to compile a program. Passing an extra parameter would entail adding that string at the end of this invocation.

If you are using Lazarus to compile programs, you can add extra parameters in Project -> Project Options… -> Compiler Options -> Custom Options

Cavender

  • New Member
  • *
  • Posts: 12
Re: ld: library not found for -lc
« Reply #16 on: December 16, 2022, 10:16:35 pm »
Thank you!  That works.

jamescavender@jamescadersimac RainGauge % fpc iterator.pas -XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
Free Pascal Compiler version 3.2.2 [2021/05/16] for aarch64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Darwin for AArch64
Compiling iterator.pas
Assembling iterator
Linking iterator
29 lines compiled, 0.1 sec
jamescavender@jamescadersimac RainGauge %

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: ld: library not found for -lc
« Reply #17 on: December 16, 2022, 10:44:50 pm »
You can create a file called ".fpc.cfg" in your home directory (note the leading dot) with the following contents. Then you don't have to add that parameter manually every time.
Code: Pascal  [Select][+][-]
  1. #include /etc/fpc.cfg
  2. -XR/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
  3.  

 

TinyPortal © 2005-2018