galib is a C++ library for implementing genetic algorithms. This page offers patches that allows better C++ compliance, as required by gcc-3.4, see e.g. the following threads on the galib mailing list reporting these problems: 1, 2, 3
You can download galib-2.4.5-al1.tar.gz here, or you can find the diff patch.
This adaptation was necessary to compile galib-2.4.5 with gcc-3.4. Since gcc-3.4 requires more compliance with the standard, tighter use of template inheritance and scoping in galib-2.4.5 was required.
Note that this patch is not completely checked, and more problems may turn
up upon compilation of specific applications using galib-2.4.5-al1 with
gcc-3.4. Disclaimer: I cannot guarantee anything for this patch. Please send
your bugs and further patch requests for compliance of galib-2.4.5-al1 with
gcc-3.4 to anthony@liekens.net
The following changes were required for getting galib-2.4.5 compiled for gcc-3.4, resulting in galib-2.4.5-al1
ga/garandom.h and ga/garandom.C is now in a GARandom namespace, thus if you use random functions of garandom.h, make sure to use the correct namespace, e.g.
#include <ga/garandom.h>
using namespace GARandom;
GARandom namespace, e.g. use
GARandom::GARandomInt();
Because of the addition of a namespace, I had to drop all random number
generators, except for the default ran2() and sran2() functions, which have
now been renamed to ran() and sran(). If you need other random functions,
you'll have to go back to an older version of galib and patch the function
you want into ga/garandom.C
== and != of GAAlleleSet<T> are now also according to the standard
<iostream.h> and <fstream.h> have been replaced by the correct <iostream> and <fstream> includes
ints with unsigned ints