This HowTo will guide you through the steps required to set up your development environment for Pascal on Windows, it will also help you set up your first SwinGame project.

  1. Install MinGW
  2. Install the Free Pascal Compiler
  3. Get SwinGame


Install MinGW

First you need to install a shell, we are going to install the MinGW (Minimalist GNU for Windows). The latest version of MinGW can be downloaded from:

Once you have downloaded MinGW run the installer, MinGW comes bundled with MSYS, and extra compilers. You must install MSYS as it is required. You might also want to install the other compilers as they may come in handy later on.

MinGW Installer

MinGW Installer

Install the Free Pascal Compiler

Once MinGW is installed properly we are going to install the Free Pascal Compiler, this is the compiler we will use to compile our SwinGame code. You can get the most recent version of FPC from

Once you've run the installer you will now need to add Free Pascal to you Windows PATH. If you don't know how, you can follow this tutorial.

You can test to see if everything has worked by opening MinGW and typing 'which fpc', this should print the path where fpc was installed.

FPC Installer

Do not install FPC to a path that has spaces! So not Program Files for example...

Get SwinGame

Now that our environment is setup we need to get a SwinGame project template, this template is the one that you will use to develop your games with. You can find the Pascal - FPC template in the Downloads section.

Once you've downloaded the template extract it, ideally you should try to extract it to a path with no spaces, somewhere like 'C:/Code/'. You can then rename the folder 'Project Template' to your game name.

Now we're going to test it, open MinGW and use the cd (Change Directory) command to move into the project template. If your game is at 'C:/Code/ProjectName' then you should enter 'cd /c/Code/ProjectName/' into the terminal. Now try and build the project, you can do this using './'. Once it has finished building the game you can use './' to run the game.

Running Your Project

cd /c/Code/YourProjectName/ 

Now you're ready to start building your own game, check out more About SwinGame and read some more HowTos to get started.