Set up Lazarus IDE in PopOS for Pascal development
2024-08-28
- Go to the Lazarus website
- Download {fpc-laz,fpc-src}-$version_$arch.deb and lazarus-project-$lpversion_$arch.deb
- For each of the above files,
dpkg -i $file
to install them
- Run Lazarus. Check the initial window that appears to make sure it can find the compiler and associated tools.
- When compiling your first project, you might get errors - see below to fix them.
Errors
Warning: linker: /usr/bin/ld: cannot find -lgdk-x11-2.0: No such file or directory
This means we need to install a package that provides the libgdk-x11-2.0.so file, so let's use apt-file to find out which package that is. Either install apt-file
or use the Ubuntu package search page.
It turns out the package we need is libgtk2.0-dev
, so install that with apt install libgtk2.0-dev
and try again.