yuriyvolkov / galib

a fork of a Matthew's Wall Genetic Algorithms Library for C++

Home Page:http://lancet.mit.edu/ga/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

examples compilation error: ‘initializer’ was not declared in this scope

yuriyvolkov opened this issue · comments

Toolchain

g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609

How to reproduce

make -f makefile

Message

In file included from ../ga/GA2DArrayGenome.h:150:0,
                 from ../ga/ga.h:168,
                 from ex17.C:13:
../ga/GA2DArrayGenome.C: In instantiation of ‘GA2DArrayAlleleGenome<T>::GA2DArrayAlleleGenome(unsigned int, unsigned int, const GAAlleleSet<T>&, GAGenome::Evaluator, void*) [with T = int; GAGenome::Evaluator = flo
at (*)(GAGenome&)]’:
ex17.C:45:63:   required from here
../ga/GA2DArrayGenome.C:272:14: error: ‘initializer’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   initializer(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_INITIALIZER);
              ^
../ga/GA2DArrayGenome.C:272:14: note: declarations in dependent base ‘GAGenome’ are not found by unqualified lookup
../ga/GA2DArrayGenome.C:272:14: note: use ‘this->initializer’ instead
../ga/GA2DArrayGenome.C:273:10: error: ‘mutator’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   mutator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_MUTATOR);
          ^
../ga/GA2DArrayGenome.C:273:10: note: declarations in dependent base ‘GAGenome’ are not found by unqualified lookup
../ga/GA2DArrayGenome.C:273:10: note: use ‘this->mutator’ instead
../ga/GA2DArrayGenome.C:274:13: error: ‘comparator’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   comparator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_COMPARATOR);
             ^
../ga/GA2DArrayGenome.C:274:13: note: declarations in dependent base ‘GAGenome’ are not found by unqualified lookup
../ga/GA2DArrayGenome.C:274:13: note: use ‘this->comparator’ instead
../ga/GA2DArrayGenome.C:275:12: error: ‘crossover’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   crossover(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_CROSSOVER);
            ^
../ga/GA2DArrayGenome.C:275:12: note: declarations in dependent base ‘GAGenome’ are not found by unqualified lookup
../ga/GA2DArrayGenome.C:275:12: note: use ‘this->crossover’ instead
../ga/GA2DArrayGenome.C: In instantiation of ‘GA2DArrayAlleleGenome<T>::GA2DArrayAlleleGenome(unsigned int, unsigned int, const GAAlleleSetArray<T>&, GAGenome::Evaluator, void*) [with T = int; GAGenome::Evaluator 
= float (*)(GAGenome&)]’:
ex17.C:138:28:   required from here
../ga/GA2DArrayGenome.C:290:10: error: ‘mutator’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   mutator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_MUTATOR);
          ^
../ga/GA2DArrayGenome.C:290:10: note: declarations in dependent base ‘GAGenome’ are not found by unqualified lookup
../ga/GA2DArrayGenome.C:290:10: note: use ‘this->mutator’ instead
../ga/GA2DArrayGenome.C:291:13: error: ‘comparator’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   comparator(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_COMPARATOR);
             ^
../ga/GA2DArrayGenome.C:291:13: note: declarations in dependent base ‘GAGenome’ are not found by unqualified lookup
../ga/GA2DArrayGenome.C:291:13: note: use ‘this->comparator’ instead
../ga/GA2DArrayGenome.C:292:12: error: ‘crossover’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   crossover(GA2DArrayAlleleGenome<T>::DEFAULT_2DARRAY_ALLELE_CROSSOVER);
            ^
../ga/GA2DArrayGenome.C:292:12: note: declarations in dependent base ‘GAGenome’ are not found by unqualified lookup
../ga/GA2DArrayGenome.C:292:12: note: use ‘this->crossover’ instead
makefile:27: recipe for target 'ex17.o' failed
make[1]: *** [ex17.o] Error 1
make[1]: Leaving directory '/home/commander/projects/galib/examples'
makefile:19: recipe for target 'ex' failed
make: *** [ex] Error 2