Compiling Z88DK on the Raspberry Pi

Compiling Z88DK on the Raspberry Pi

The Z88DK project provides C compilers and libraries for over 100 Z80 machines, including the RC2014, ZX Spectrum and ZX Spectrum Next. Here are some quick notes showing how I got Z88DK working on my Raspberry Pi 4.

Just installing z88dk via apt resulted in an old version, so I opted to install from source instead.


First I installed some dependencies: –

sudo apt install libxml2-dev
sudo apt install bison
sudo apt install flex
sudo apt install libboost-all-dev

Code Download

Then I downloaded and uncompressed it: –

tar -xzf z88dk-latest.tgz
cd z88dk/


Here is how I compiled the software (it took a while!) : –

export BUILD_SDCC=1


Once everything is compiled, you need to run the following commands to ensure that the executables and libraries can be found (it’s probably a good idea to add these lines to your ~/.profile file).

export PATH=${PATH}:${HOME}/z88dk/bin
export ZCCCFG=${HOME}/z88dk/lib/config


You should then have the necessary tools available, which you can check by running the following commands, separately: –


zsdcc -v



Once you’ve got everything ready, check out my post on programming in C for the ZX Spectrum.

One thought on “Compiling Z88DK on the Raspberry Pi

Leave a Reply

Your email address will not be published. Required fields are marked *