vendredi 22 septembre 2017

error: `erfc` is not a member of `std`

I am trying to build OpenNN library according to instructions here. But after

make opennn

I get the following output (not full):

[2%] Built target tinyxml2 
[4%] Building CXX object opennn/CMakeFiles/http://ift.tt/2xzJFdX
In file included from /home/wolfgang/Downloads/OpenNN/opennn/variables.h:32:0,
             from /home/wolfgang/Downloads/OpenNN/opennn/variables.cpp:16:
/home/wolfgang/Downloads/OpenNN/opennn/vector.h: In member function ‘bool OpenNN::Vector<T>::Lillieforts_normality_test() const’:
/home/wolfgang/Downloads/OpenNN/opennn/vector.h:1144:20: error: ‘erfc’ is not a member of ‘std’
     Fx = 0.5 * std::erfc((mean - (*this)[i])/(standard_deviation*std::sqrt(2)));

the above output ends with

make[3]: *** [opennn/CMakeFiles/http://ift.tt/2xzJFdX] Error 1
make[2]: *** [opennn/CMakeFiles/opennn.dir/all] Error 2
make[1]: *** [opennn/CMakeFiles/opennn.dir/rule] Error 2
make: *** [opennn] Error 2

I think I should use -std=c++11 or something but I do not know exactly how. I tried to add these lines

CXXFLAGS += -std=c++11

to Makefile but it does not work.

Aucun commentaire:

Enregistrer un commentaire