Désolé, c'est vrai...
1. Ce sont des erreurs de compil.
2. J'utilise galib de façon statique (je n'ai pas compilé la librairie [make etc..])
3. Les dépendances du projet, c'est bien cela qui m'embète.
Voici un extrait du code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#include <ga/GASimpleGA.h> // we're going to use the simple GA
#include <ga/GA2DBinStrGenome.h> // and the 2D binary string genome
#include <ga/std_stream.h>
#include <ga/garandom.h>
#define cout STD_COUT
float Objective(GAGenome &); // This is the declaration of our obj function.
// The definition comes later in the file.
int
main(int argc, char **argv)
{
cout << "Example 1\n\n";
cout << "This program tries to fill a 2DBinaryStringGenome with\n";
cout << "alternating 1s and 0s using a SimpleGA\n\n"; cout.flush();
// See if we've been given a seed to use (for testing purposes). When you
// specify a random seed, the evolution will be exactly the same each time
// you use that seed number.
for(int ii=1; ii<argc; ii++) {
if(strcmp(argv[ii++],"seed") == 0) {
GARandomSeed((unsigned int)atoi(argv[ii]));
}
} |
etc...
et voici la première erreur donnée à la compil :
D:/Mes documents/RECHERCHE/DEVELOPPEMENT/monGA/main.cpp:39: undefined reference to `GARandomSeed(unsigned int)'
Or, comme je le disais le fichier ga/garandom.h est trouvé (comme les autres dailleurs...), et on y trouve la déclaration suivante :
void GARandomSeed(unsigned int seed=0); qui est implémentée dans garandom.C
Voilà...
Merci, Patrick.
Partager