Support»Building On Win 32

Building On Win 32

Building Geany on Windows

Note: It is not necessary to build Geany on Windows yourself as Windows binaries are provided on the Releases page.

Windows makefiles were added to SVN on Friday, July 28, 2006, and will be distributed with Geany 0.8 and future source releases. Follow the instructions below.

Requirements

GTK+ Runtime

You probably already have the GTK+ runtime installed if you run Geany on Windows - if not, install it now - see Running on Windows. Note that you can use a higher runtime version than the development libraries used (assuming your Windows version is supported).

Minimal GNU for Windows toolchain

You need the Minimal GNU for Windows build toolchain from http://www.mingw.org - they provide a lot of files, but all you should need is MinGW-4.1.1.exe or higher. Get this from the Sourceforge page at: http://sourceforge.net/project/showfiles.php?group_id=2435

After running the MinGW EXE installer, gcc, g++ and windres should be in your path - if not, add the MinGW binary directory (usually C:\MinGW\bin) to your path.

GTK+ development files

You need the development files of the GTK stack (GTK, GLib, Pango, ATK, Cairo) and a few other libraries to be able to compile Geany on Windows.

You can find everything you need on http://www.gtk.org/download-windows.html. The easiest way to get everything necessary is the 'bundle' offered on this site and the Iconv library. Download both files and extract their contents into the directory "c:\libs\". (Note it is possible to change this directory - see the localwin32.mk and MSYS section). This directory should contain (at least) the following subdirectories:

bin include lib share

Now add the directory "c:\libs\bin" to your path.

Build

Extract the Geany source .tar.gz or .tar.bz (To decompress these try http://www.7zip.org). From a command prompt, cd to the extracted directory and run:

make -f makefile.win32

The makefile will check you have the basic tools installed, then generate source file dependencies and build Geany. You should end up with geany.exe.

localwin32.mk and MSYS

It is possible to override the default variables in the Windows makefiles. Create a textfile named localwin32.mk in the same directory as the top level makefile.win32, then add settings for any variables you want to override, e.g. for building with the MSYS bash shell with development libraries installed in "C:\msys\1.0\local":

PREFIX = C:\msys\1.0\local
CP = cp
RM = rm -f

localwin32.mk should end with a blank line.

If the build fails with a missing header error message such as: ctags.c:23:18: glib.h: No such file or directory

Try setting PREFIX to a MSYS style path - e.g. /usr/local