[galib] compilation errors using g++
Alejandro Marcos Aragón
alex_aragon at hotmail.com
Fri Mar 10 22:13:07 EST 2006
Hi all,
I have already a project and I'm at the point that I have to attach the GA
part. When I try to add something related to GA I received "undefined
reference" error messages:
/home/aaragon/Desktop/MURI/gui/main.cxx:37: undefined reference to
`GA2DBinaryStringGenome::GA2DBinaryStringGenome(unsigned int, unsigned int,
float (*)(GAGenome&), void*)'
/home/aaragon/Desktop/MURI/gui/main.cxx:38: undefined reference to
`GASimpleGA::GASimpleGA(GAGenome const&)'
/home/aaragon/Desktop/MURI/gui/main.cxx:39: undefined reference to
`GASimpleGA::populationSize(unsigned int)'
/tmp/cc5Dbmh2.o: In function `main':
/usr/local/include/ga/GAParameter.h:78: undefined reference to
`GAParameterList::set(char const*, void const*)'
/tmp/cc5Dbmh2.o: In function `pMutation':
/usr/local/include/ga/GABaseGA.h:186: undefined reference to
`GAParameterList::set(char const*, double)'
/tmp/cc5Dbmh2.o: In function `pCrossover':
/usr/local/include/ga/GABaseGA.h:183: undefined reference to
`GAParameterList::set(char const*, double)'
/tmp/cc5Dbmh2.o: In function `evolve':
/usr/local/include/ga/GABaseGA.h:138: undefined reference to
`GAStatistics::flushScores()'
/tmp/cc5Dbmh2.o: In function `main':
/home/aaragon/Desktop/MURI/gui/main.cxx:47: undefined reference to
`GAStatistics::bestIndividual(unsigned int) const'
/home/aaragon/Desktop/MURI/gui/main.cxx:118: undefined reference to
`GASimpleGA::~GASimpleGA()'
/home/aaragon/Desktop/MURI/gui/main.cxx:118: undefined reference to
`GA2DBinaryStringGenome::~GA2DBinaryStringGenome()'
/home/aaragon/Desktop/MURI/gui/main.cxx:19: undefined reference to
`GARandomSeed(unsigned int)'
/home/aaragon/Desktop/MURI/gui/main.cxx:118: undefined reference to
`GASimpleGA::~GASimpleGA()'
/home/aaragon/Desktop/MURI/gui/main.cxx:118: undefined reference to
`GA2DBinaryStringGenome::~GA2DBinaryStringGenome()'
collect2: ld returned 1 exit status
make: *** [a.out] Error 1
Any ideas on what's going on? The compilation was succesful and the header
files are in the right place. How do I fix this?
Thank you
More information about the galib
mailing list