[galib] GCC 3.4.3 + GALib

Steven Bilton swb04 at doc.ic.ac.uk
Wed Feb 20 09:03:37 EST 2008


Hi,

Having endless problems getting GCC 3.4.3 to compile GALib, although it 
compiled in VS with no issues. Setting it to permissive removed a large 
chunk of these to make it actually workable, but there's still a vast 
array of errors, such as:

./ga/garandom.h:80: error: syntax error before '=' token
./ga/garandom.h:93: error: redefinition of 'GARandomInt'
...
./ga/GA1DArrayGenome.h:41: error: storage class specified for parameter 
`SwapMutator'
./ga/GA1DArrayGenome.h:42: error: syntax error before '&' token
...
And many more.

As it says in the docs it should compile out the box with 2.4.7 on GCC, 
I'm wondering whether I've got some bad flags set. I changed gaconfig.h 
ever so slightly so it recognised my compiler, so it looks like

#elif defined(__GNUG__) || defined(__GNUC__) // <-- GNUC was added
#define GALIB_USE_RTTI
#define GALIB_USE_BORLAND_INST
#define GALIB_USE_STREAMS
#define GALIB_USE_PID
#define GALIB_USE_EMPTY_TEMPLATES
#define GALIB_NEED_INSTANTIATION_PREFIX
#if __GNUC__ > 2
#define GALIB_USE_ANSI_HEADERS
#define GALIB_USE_STD_NAMESPACE
#define GALIB_USE_COMP_OPERATOR_TEMPLATES
#endif

Is this likely to be an issue with these ifdefs, and if so has anybody 
any pointers as to what?

Cheers
Steve



More information about the galib mailing list