Bytes & Bobs

Set up Lazarus IDE in PopOS for Pascal development

2024-08-28

  1. Go to the Lazarus website
  2. Download {fpc-laz,fpc-src}-$version_$arch.deb and lazarus-project-$lpversion_$arch.deb
  3. For each of the above files, dpkg -i $file to install them
  4. Run Lazarus. Check the initial window that appears to make sure it can find the compiler and associated tools.
  5. 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.

Tagged with: programming, pascal