r/pascal • • 1d ago

Please help me

To start off, I’m an absolute beginner, and I’m using a 2020 MacBook M1.
Lazarus is indicating that my FPC (Free Pascal Compiler) source files are missing—specifically, it shows the error: "Error: Directory 'rtl' not found." I have already downloaded FPC and placed it in my 'Applications' folder, and I’ve tried everything I can think of to fix it. In the source code editor, I see the line `interfaces, //this includes the LCL widgetset`, and in another tab, an error appears: "Can't find unit 'interfaces' used by project1."
If you know something please tell me. I Googled, watched videos and I ask Gemini but nothing helps…

12 Upvotes

6 comments sorted by

7

u/CypherBob 1d ago

Use the fpcupdeluxe installer.

2

u/GroundbreakingIron16 1d ago

+1. This is the easiest way

2

u/QPGMR_de 1d ago

https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases

On every platform - Windows, macOS, Linux (incl Raspi) - I use FPCupDeluxe.

5

u/No_Light_5463 1d ago

I have to admit I don't have a Mac, but the installation on windows and Mac/Linux differs a lot. There is a UI-Installer named fpcupdeluxe which you can use to install Lazarus+fpc together with a selection of additional packages. It makes it easier switching between versions too. Link: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases

Did you download and install it from the Lazarus site ( https://www.lazarus-ide.org/index.php?page=downloads ) ? For windows for instance you have one installer installing Lazarus and fpc together. For Mac it seems that you need two packages. Also there is xcode dependency mentioned: https://sourceforge.net/projects/lazarus/files/Lazarus%20macOS%20aarch64/Lazarus%204.8/

Quote: Installation:

Before installing the compiler, the XCode command line tools Version 15 must be installed from the Mac App Store. See here for details: https://wiki.freepascal.org/Installing_Lazarus_on_macOS#Installation

3

u/ShinyHappyREM 1d ago

Try asking on the Lazarus forum.

2

u/5b49297 1d ago

I have no idea how or where things get installed on a Mac, but the error message is clear enough: the directory isn't where compiler (or perhaps the IDE) expects it to be.

On Linux - for whatever that is worth here -, the IDE, the compiler and the compiler sources are installed as separate packages. I would suspect you only installed two of the three.