ubuntu中的fann库错误:/usr/local/lib/libfann.so.2:undefined symbol:pow(fann library error in ubuntu: /usr/

编程入门 行业动态 更新时间:2024-10-27 19:25:51
ubuntu中的fann库错误:/usr/local/lib/libfann.so.2:undefined symbol:pow(fann library error in ubuntu: /usr/local/lib/libfann.so.2: undefined symbol: pow)

我正在尝试在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 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.

最满意答案

为避免这种情况,请确保以下内容:

确保安装了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 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!

更多推荐

本文发布于:2023-07-22 19:21:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1222712.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   local   lib   usr   ubuntu

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!