Skip to content
Advertisement

How to use FANN in C++

Here I have read good references about FANN for Artificial Neural Networks in C/C++. Actually I am using C++ (on Ubuntu with g++ v4.6.1). The library written in C, has a wrapper for C++. But I don’t get it to work. Even the example included xor_sample.cpp works.

I have a Makefile with a line like this:

JavaScript

Being FANNINCLUDE the path to FANN/src/include, where the headers are (floatfan.h and fann_cpp.h).

Has somebody actually compiled it for C++? What I am doing wrong? My intention is to use the headers files (NOT installing the library and linking with –lfann). Is this possible?

EDIT: I get this errors

JavaScript

Advertisement

Answer

if you just need them installed, they are already on ubuntu repository

JavaScript

if you still want to install it from source, there’s a guide on their page http://leenissen.dk/fann/wp/help/installing-fann/ if this doesn’t bring you further, try installing to other location using: cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr .

Hope this helps

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement