Question

I am trying to build fann neural network library in ubuntu 12.04 but failed to use it as the testing routine is not working. Following the instructions in http://leenissen.dk/fann/wp/help/installing-fann/. After cmake and install when I want to test if the library is working, by cd to examples and then running:

make runtest

what I get is here:

gcc -O3 xor_train.c -o xor_train -lfann -lm
gcc -O3 xor_test.c -o xor_test -lfann -lm
gcc -O3 -DFIXEDFANN xor_test.c -o xor_test_fixed -lfixedfann -lm
gcc -O3 simple_train.c -o simple_train -lfann -lm
gcc -O3 steepness_train.c -o steepness_train -lfann -lm
gcc -O3 simple_test.c -o simple_test -lfann -lm
gcc -O3 robot.c -o robot -lfann -lm
gcc -O3 mushroom.c -o mushroom -lfann -lm
gcc -O3 cascade_train.c -o cascade_train -lfann -lm
gcc -O3 scaling_test.c -o scaling_test -lfann -lm
gcc -O3 scaling_train.c -o scaling_train -lfann -lm

Training network
./xor_train
Creating network.
./xor_train: symbol lookup error: /usr/local/lib/libfann.so.2: undefined symbol: pow
make: *** [runtest] Error 127

I tried this couple of times with different sources and versions but still I got the same error.

Does anyone have a solution for that? or any other option to use this library without having all these errors.

Thanks.

Was it helpful?

Solution

To avoid this make sure of the following:

Make sure you have g++ installed:

sudo aptitude install g++

Make sure you have installed libfann2

sudo aptitude install libfann-dev libfann2

It would also be great to check that you have gcc, make, cmake-data and cmake-dbg

sudo aptitude install make cmake-data cmake-dbg

Finally install

sudo aptitude install build-essential

And once inside of the file, import:

#include <stdio.h>
#include <floatfann.h>
#include <fann.h>

With these steps, it should work!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top