mwydmuch/napkinXC

build failed

SeekPoint opened this issue · 1 comments

ub16hp@UB16HP:~/ub16_prj/napkinXML$ make
[ 6%] Building CXX object CMakeFiles/nxml.dir/src/main.cpp.o
In file included from /home/ub16hp/ub16_prj/napkinXML/src/main.cpp:8:0:
/home/ub16hp/ub16_prj/napkinXML/src/base.h: In member function ‘double Base::predictLoss(U*)’:
/home/ub16hp/ub16_prj/napkinXML/src/base.h:65:25: error: ‘pow’ is not a member of ‘std’
if(hingeLoss) val = std::pow(fmax(0, 1 - val), 2); // Hinge squared loss
^
/home/ub16hp/ub16_prj/napkinXML/src/base.h:65:49: error: there are no arguments to ‘fmax’ that depend on a template parameter, so a declaration of ‘fmax’ must be available [-fpermissive]
if(hingeLoss) val = std::pow(fmax(0, 1 - val), 2); // Hinge squared loss
^
/home/ub16hp/ub16_prj/napkinXML/src/base.h:65:49: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/home/ub16hp/ub16_prj/napkinXML/src/base.h:66:32: error: there are no arguments to ‘exp’ that depend on a template parameter, so a declaration of ‘exp’ must be available [-fpermissive]
else val = log(1 + exp(-val)); // Log loss
^
/home/ub16hp/ub16_prj/napkinXML/src/base.h: In member function ‘double Base::predictProbability(U*)’:
/home/ub16hp/ub16_prj/napkinXML/src/base.h:74:50: error: there are no arguments to ‘exp’ that depend on a template parameter, so a declaration of ‘exp’ must be available [-fpermissive]
if(hingeLoss) val = 1.0 / (1.0 + exp(-2 * val)); // Probability for squared Hinge loss solver
^
/home/ub16hp/ub16_prj/napkinXML/src/base.h:75:37: error: there are no arguments to ‘exp’ that depend on a template parameter, so a declaration of ‘exp’ must be available [-fpermissive]
else val = 1.0 / (1.0 + exp(-val)); // Probability
^
CMakeFiles/nxml.dir/build.make:86: recipe for target 'CMakeFiles/nxml.dir/src/main.cpp.o' failed
make[2]: *** [CMakeFiles/nxml.dir/src/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/nxml.dir/all' failed
make[1]: *** [CMakeFiles/nxml.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I'm closing this since it's an outdated issue.