Here is an example how to use libkombilo in a C++ program, just to illustrate that there is no dependency on Python anymore. There is a (very) simple /06/libkombilo/cpptest.cpp C++ program in the repository. It's just a few lines long, and the code is very much analogous to the Python examples, so I will not discuss that here. You will have to change the path pointing to the directory with sgf files (or to slightly extend the code in order to process several directories, or to process one recursively etc.)

Linux

This should work more or less out of the box on Linux systems. I compiled (together with the libkombilo files proper) by

g++ -o cpptest -lsqlite3 -lboost_filesystem search.cc sgfparser.cc abstractboard.cc cpptest.cc 

This produces an executable cpptest. Note that you need to have the sqlite3 library installed (in a place where g++ finds it), as well as the Boost::filesystem library1. These libraries are available for all major Linux distributions (as well as for Windows).

Windows

There are a number of C++ compilers for Windows, and several of them are freely available (free as in beer), for instance

I chose to go with the first one (which is actually open source), but I do not think that there should be any problems compiling libkombilo with one of the others. (Using valuable feedback from Gilles Arcas, I made some changes in order to make the code compilable with Borland's C++ builder and with Visual C++. If there are still any glitches with this, please contact me.)

Setting up Dev-C++

I downloaded the current beta version (version 4.9.9.2) from http://www.bloodshed.net/devcpp.html, and installed it on my Windows 2000 box. The Dev-C++ has a very convenient system of adding libraries. Go to Tools->Check for Updates/Packages..., select the devpaks.org server, check for updates, and retrieve the sqlite3 and boost1 libraries.

Setting up the libkombilo project

Open a new "Win32 console" project in Dev-C++ and add all the *.h and *.cc files from libkombilo. The only step which remains to do and which is not totally obvious is to add the following two lines to the linker command line in Project options->Parameters: (the exact name of the Boost library might vary a little, I suppose)

lib/libsqlite3.a
lib/libboost_filesystem-mgw-mt-s-1_33_1.lib

Now you should be able to compile with Ctrl-F9, and then to run the resulting exe file. (Unless you tweak the cpptest.cc file, it is easier to run it from a console window, because otherwise the output will disappear right after the program finishes.)

Mac OS X

I do not have access to a Mac, so I cannot say much at this point. However Marcel Grünauer's remarks on how to get the Python interface to libkombilo to work probably contain all the information needed to do the pure C++ stuff.


1 The boost library is not really necessary for libkombilo - it is just used as a simple and cross-platform mechanism to traverse a directory (in order to find all the sgf files stored there).