我正在尝试在ubuntu 12.04中构建fann神经网络库,但未能使用它,因为测试例程不起作用。 按照http://leenissen.dk/fann/wp/help/installing-fann/中的说明操作。 在cmake和安装之后,当我想测试库是否正常工作时,通过cd到示例然后运行:
make runtest我得到的是这里:
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 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 runtestwhat 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 127I 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.
最满意答案
为避免这种情况,请确保以下内容:
确保安装了g ++:
sudo aptitude install g++确保已安装libfann2
sudo aptitude install libfann-dev libfann2检查你是否有gcc,make,cmake-data和cmake-dbg也很棒
sudo aptitude install make cmake-data cmake-dbg最后安装
sudo aptitude install build-essential一旦进入文件,导入:
#include <stdio.h> #include <floatfann.h> #include <fann.h>通过这些步骤,它应该工作!
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 libfann2It would also be great to check that you have gcc, make, cmake-data and cmake-dbg
sudo aptitude install make cmake-data cmake-dbgFinally install
sudo aptitude install build-essentialAnd once inside of the file, import:
#include <stdio.h> #include <floatfann.h> #include <fann.h>With these steps, it should work!
更多推荐
发布评论