[galib] Compiling with gcc4

Miguel Nicolau Miguel.Nicolau at ul.ie
Mon Jun 26 09:24:02 EDT 2006


Hi Tim,

Edit the file ga/gaconfig.h (line 368) and change:

#if __GNUC__ == 3

to

#if __GNUC__ >= 3

You need this change in order to define the symbol 
"GALIB_USE_COMP_OPERATOR_TEMPLATES", which is used by GAAllele.h. Your 
change below is only useful to correct set the definition of 
"GALIB_LIBRARY_IDENTIFIER", inside gaversion.h.

Hope this helps

.Miguel


this answer has been sent to the list a few times.

Tim-Oliver Husser wrote:
> Hi,
> 
> galib always worked fine with gcc3, but with gcc4 I get some problems.
> In the gaconfig.h I added a #define for the new compiler:
> 
> // determine the compiler
> #if defined(__GNUG__) || defined(__GNUC__)
> #if __GNUC__ == 4
> #define GALIB_COMPILER "gcc4"
> #elif __GNUC__ == 3
> #define GALIB_COMPILER "gcc3"
> #elif __GNUC__ == 2
> #define GALIB_COMPILER "gcc2"
> #else
> #define GALIB_COMPILER "gcc"
> #endif
> 
> But when I try to compile it I get some error messages:
> 
> ../ga/GAAllele.h:147: Fehler: Deklaration von »operator==« als 
> Nicht-Funktion
> ../ga/GAAllele.h:147: Fehler: expected »;« before »<« token
> ../ga/GAAllele.h:148: Fehler: Deklaration von »operator!=« als 
> Nicht-Funktion
> ../ga/GAAllele.h:148: Fehler: expected »;« before »<« token
> 
> Sorry for the german message, "Deklaration von ... als Nicht-Funktion" 
> means "Declaration of ... as non-function". The two mentioned lines are 
> the following:
> 
> friend int operator==<>(const GAAlleleSet<T> &, const GAAlleleSet<T> &);
> friend int operator!=<>(const GAAlleleSet<T> &, const GAAlleleSet<T> &);
> 
> Any ideas what's going wrong here? Thanks.
> 
> Cheers,
> Tim-Oliver
> _______________________________________________
> galib mailing list
> galib at mit.edu
> http://mailman.mit.edu/mailman/listinfo/galib
> 



More information about the galib mailing list