This page describes different methods for installing Geany and the compiler on your computer.
Once finished, go and read how to configure Geany to make it more useful for you and check out a few hints on using it.
Guide: Geany configuration and usage.
The setup in Linux is the most straight forward. The guide should function on all debian-based Linux distros using apt (e.g. Ubuntu, Kubuntu, Pop!_OS, Linux Mint, …)
If your distro has a different package manager, then you should read into its manual or use the graphic interface.
- Open the terminal / console. Typically it is available both from the launcher or by right-clicking the mouse.
- Run the following commands:
1 2 |
sudo apt update sudo apt install geany geany-plugins build-essential valgrind cppcheck |
The simplest way to install the required software is using Chocolatey package manager (https://chocolatey.org/install). Just run the following command in your Windows command line to install all the required software in one go:
1 |
choco install geany geany-plugins mingw make |
This will install the text editor and compiler. Everything will be set up automatically, no need to do anything else.
NB! If your OS language differs from English and you wish to have the IDE in English, you can delete or rename the folder /share/locale under Geany installation directory.
First of all, you should download 2 programs:
- Geany code editor: http://www.geany.org/Download/Releases
- MinGW package (used to download GCC compiler): https://osdn.net/projects/mingw/downloads/68260/mingw-get-setup.exe/
Let’s start from the compiler
- Run and install the MinGW package manager
- Now we have to choose the packages that will be installed. We will need ‘mingw32-base’ (1). Select it and mark it for installation (2). Now all that remains is to confirm our selection and for that choose ‘Installation’ (3) and ‘apply changes’
- In the next window we can confirm that the wanted components are selected and start the install.
- Now that the compiler is installed, we can go ahead and set up Geany. The setup is straight forward and can be installed with the default settings.
The required components are now installed. Now we need to make them communicate with each other and for that we need to modify the environment.
- Click the right mouse button over the start button and select ‘System’
- Now go to ‘Advanced system settings’
- From here we choose ‘Environment variables’ from the ‘Advanced’ tab.
- Look for the ‘Path’ variable under ‘System variables’ (this can also be written in uppercase) and click ‘Edit’.
- Now we need to enter the location of our GCC compiler. For this, first click the ‘New’ button and then type or copy in the location to the compiler.
The default location is ‘C:\MinGW\bin’.
If you’re not sure about it, You can look if ‘gcc.exe’ is located in that folder or search for it in your computer. - Now confirm all the changes we made and test if we were successful. For this, we can just start the console (command prompt) and see if the compiler will be found (run ‘gcc –version’ for an example) or use Geany to compile Your first program on Your computer.
Common issues:
- If in the end of the tutorial you can’t see GCC version, then you have missed a step in the installation process
- If some of the screenshots don’t match, it’s because Windows 10 changes how things look and where they are hidden twice a year. Due to constant changes variety of builds that are still considered “latest”, it is impossible to have a single Windows 10 guide. The required pages and options should still be named and placed similarly.
- If you try to compile your first program, but it fails, it’s likely blocked by the antivirus software you have on your computer. Check what components and folders need to be whitelisted and how the antivirus software needs to be configured to allow for compiling programs. This is dependent on your particular configuration and antivirus software.