Programming

Geert Janssens geert.gnucash at kobaltwit.be
Thu Oct 9 10:29:44 EDT 2014


On Thursday 09 October 2014 16:29:25 bert wrote:
> Hello
> I have been using gncash for about 12 months and find it good to use.
> I am interested in changing or writing some reports.
> Can any one help me to get going.
> In the past  I have programmed in Theos Basic and in Visual Basic.
> 
> I have installed DrRacket as that seems to be the latest or best,
> however every time I open a uncompiled program it comes back with
> errors. My previous experience to learn is, to open a program see
> what it does when it runs, and then  look at the code.
> 
> Hope you can help
> 
> Bert


Hi Bert,

Great you are looking to change or write some reports! These are written 
in scheme - as flavor of lisp - and GnuCash uses libguile to interpret 
the report files.

To give you some background: scheme is not the only language used in 
GnuCash. The majority of the code is written in C/C++. The code 
generates wrappers around many C functions to make it possible for the 
scheme code to call these C functions as well.

In addition, GnuCash depends on a lot of external libraries to run. So 
in order to build gnucash yourself you would need to install these as 
well. This can be pretty cumbersome on Windows. Fortunately the GnuCash 
developers have written a script to do all this for you. You can read 
[1] to get you started.

When you followed these instructions successfully you will have built 
your own version of gnucash which you can install. Or you can modify the 
sources and build gnucash again at will.


That is the elaborate way. Since you are interested in writing reports, 
you may take a shortcut if you like. Since the reports are written in 
scheme (an interpreted language) there is no need to build anything. You 
can just write the report, add it in your .gnucash directory and restart 
gnucash. You can read some more about this here [2].

Finally I don't know DrRacket. I quickly scanned its website, but I 
couldn't easily find if it supports the guile/scheme variant of lisp.

I usually use kate/kwrite (from kde) to alter scheme files. It offers 
syntax highlighting which is sufficient for me. Perhaps others know 
better tools to work with guile/scheme on Windows.

Good luck !

Geert


[1] https://github.com/Gnucash/gnucash-on-windows/blob/master/README
[2] http://wiki.gnucash.org/wiki/Custom_Reports


More information about the gnucash-user mailing list