Step 1: Get the SDL3 Library to your system
- Go to the official release site of SDL3: https://github.com/libsdl-org/SDL/releases
- Find the latest SDL3 release (e. g. 3.2.4) and get the files from the “Assets” block.
- Linux: SDL3-3.2.4.zip
- Windows 32 Bit: SDL3-3.2.4-win32-x86.zip
- Windows 64 Bit: SDL3-3.2.4-win32-x64.zip
- Extract the file.
Step 2: Install SDL3
Windows
For Windows it is as easy as copying the SDL3.dll to your system or system32 folder (try it out). Alternatively you can also just copy the SDL3.dll in the same folder as your SDL3 application resides.
Linux
As SDL3 is very new, it has not been entered the package managers of the distributions yet. This means, you need to compile and install it manually. If SDL3 is shipped with the distribution’s package managers you install it automatically this much more convenient way.
For the compilation you simply go in the extracted folder in the Terminal and run these three commands one after another:
cmake -S . -B build
cmake --build build
sudo cmake --install build --prefix /usr/local
The first try you may be informed you need to install some dependencies to run cmake. You should install them.
If you are successful, you end up with a “build” folder in which you find libSDL3.so and further files. Also a copy is found in your system’s /usr/local folder. So your system is ready to use SDL3.
Step 3: Get the SDL3 unit for Pascal
- Go to: https://github.com/PascalGameDevelopment/SDL3-for-Pascal
- Find the green button “< > Code” and click on it.
- Click on “Download ZIP” to download the SDL3 unit.
- Extract the files and now they are ready to use.
Step 4: Setup Lazarus Project
If you use the Lazarus IDE for development, do not forget to set the following paths:

In the “Paths” sub-options menu of the “Compiler Options”, you need to set the path in “Other unit files (-Fu)” to the SDL3 units. The setting (“units”) as displayed in the screenshot means that the SDL3 unit files are in a “units” subfolder of your application folder.
For other editors you need to set them accordingly. If you compile from command line, use the compiler flags.
If your SDL3 shared library files are not recognized system wide you may have copied the DLL files to the wrong system folder on Windows. In Linux the way to achieve this may vary depending on you distribution. Assuming you have an Ubuntu/Mint system, you may try:
ldconfig -n /usr/local/libSDL3.so
sudo ldconfig
That’s it, you should be able to run SDL3 applications done in Pascal now. 🙂