This page deals with building GnuCash from the source code. It includes building the current stable release from source code (downloaded as tarballs) as well as the developers version of GnuCash from the Git repository. If you are searching for instructions for the stable version available from your distribution's software repositories, you should read Installation.
This page doesn't provide specific instructions for optional third-party modules—like AqBanking or Perl Finance::Quote—but does list the dependencies required and links to the configuration switches used with CMake to include them during compilation.
GnuCash can be built from sources on Linux distributions, Microsoft Windows and MacOS. There are three major steps in building the GnuCash program. These are listed along with the tools which may used for each step:
- Configuration (cmake - autotools in earlier GnuCash versions)
- Compilation ( make or ninja)
- Installation (make or ninja)
Building GnuCash utilizes a set of tools which is available for all three of the major operating systems. These steps are described in detail for each operating system in the linked pages below, along with the installation of the build tools.
A general description of the tools used to configure and build GnuCash is given in Build tools.
A listing of dependencies is available at Dependencies.
The GnuCash build system has gone through some changes in the course of the 2.6 and 3 series. CMake has replaced the Autotools autogen and configure scripts for configuring the build. This has provided the ability to configure for alternative build systems and popular IDEs. Under the hood compilation and installation can now either be controlled using GNU Make or alternatively using the faster Ninja. Depending on the version of GnuCash you want to build you have the following options:
- For the application generally
- GnuCash 3 and more recent
- These versions are configured using CMake. Autotools support has been removed. Either make or ninja may be used for the build.
- GnuCash 2.6 and earlier
- These versions are configured with Autotools and built with the GNU make utility. GnuCash from v2.6.13 allowed experimental use of cmake to configure and ninja to build.
- For the Source API Documentation
- This is built directly from the program sources. Depending on how the build system is configured you can use
ninja doc. Note this requires Doxygen to be installed.
- For the documentation
- The GnuCash Help and Tutorial and Concept Guide are configured with Autotools and built with Make.
GnuCash 3.x, the current maint branch, requires a C++ compiler that supports ISO-standards C11 and C++11. Gcc version >=4.8 and Clang version >= 3.3 are known to work.
For GnuCash 4.x, the current master branch, we expect to require C++14 and may require C++17 compatibility.
Building on Linux Distributions
Detailed instructions for building GnuCash on Linux distributions can be found on Building On Linux.
Building on MacOS
Building on Microsoft Windows
Compiling GnuCash on Windows is possible, but much more difficult than on Linux. For details, see GnuCash on Microsoft Windows.