You are not logged in.

#1 2007-08-31 09:50:34

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

problem in linking with galib

Hi

the following works:

>make
\rm -f ga.exe
g++ -O2 -I/usr/include/ga -c individual.cc
g++ -O2 -I/usr/include/ga -o ga.exe -lrt individual.o /usr/lib/libga.a

In the other hand the following:

>\rm -f ga.exe
>g++ -O2 -I/usr/include/ga -o ga.exe -lga -lrt individual.o
individual.o: In function `main':
individual.cc:(.text+0x60f): undefined reference to `GARandomSeed(unsigned int)'
individual.cc:(.text+0x91a): undefined reference to `GAGenome::GAGenome(void (*)(GAGenome&), int (*)(GAGenome&, float), float (*)(GAGenome const&, GAGenome const&))'
... and zillion of other errors ...

Any idea what am i doing wrong?

Offline

#2 2007-08-31 13:44:37

bboozzoo
Member
From: Poland
Registered: 2006-08-01
Posts: 125

Re: problem in linking with galib

have you checked if there is appropriate *.so in /usr/lib?

Offline

#3 2007-09-03 11:15:33

drakosha
Member
Registered: 2006-01-03
Posts: 253
Website

Re: problem in linking with galib

No, there's only .a
Isn't it enough?

Offline

Board footer

Powered by FluxBB