Closed nameofuser1 closed 5 years ago
I got compilation error when building on Ubuntu 18.04
In file included from /home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.hpp:114:0, from /home/yuriy/Documents/dmpbbo/src/dynamicalsystems/DynamicalSystem.hpp:33, from /home/yuriy/Documents/dmpbbo/src/dynamicalsystems/DynamicalSystem.cpp:24: /home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp: In function ‘void boost::serialization::load(Archive&, Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&, unsigned int)’: /home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:100:12: error: ‘cerr’ is not a member of ‘std’ std::cerr << __FILE__ << ":" << __LINE__ << ":"; ^~~~ /home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:100:12: note: suggested alternative: ‘errc’ std::cerr << __FILE__ << ":" << __LINE__ << ":"; ^~~~ errc /home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:101:12: error: ‘cerr’ is not a member of ‘std’ std::cerr << "WARNING: Unexpected character '" << c << "' when deserializing Eigen::Matrix." << std::endl; ^~~~ /home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:101:12: note: suggested alternative: ‘errc’ std::cerr << "WARNING: Unexpected character '" << c << "' when deserializing Eigen::Matrix." << std::endl; ^~~~ errc /home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:131:18: error: ‘cerr’ is not a member of ‘std’ std::cerr << __FILE__ << ":" << __LINE__ << ":"; ^~~~ /home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:131:18: note: suggested alternative: ‘errc’ std::cerr << __FILE__ << ":" << __LINE__ << ":"; ^~~~ errc /home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:132:18: error: ‘cerr’ is not a member of ‘std’ std::cerr << "WARNING: Unexpected character '" << c << "' when deserializing Eigen::Matrix." << std::endl; ^~~~ /home/yuriy/Documents/dmpbbo/src/dmpbbo_io/EigenBoostSerialization.tpp:132:18: note: suggested alternative: ‘errc’ std::cerr << "WARNING: Unexpected character '" << c << "' when deserializing Eigen::Matrix." << std::endl; ^~~~ errc src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/build.make:62: recipe for target 'src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/DynamicalSystem.cpp.o' failed make[2]: *** [src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/DynamicalSystem.cpp.o] Error 1 CMakeFiles/Makefile2:223: recipe for target 'src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/all' failed make[1]: *** [src/dynamicalsystems/CMakeFiles/dynamicalsystems.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2
Adding #include <iostream> before https://github.com/stulp/dmpbbo/blob/6bcb76d835c8a05680cbf7b0be16d59e0836846b/src/dmpbbo_io/EigenBoostSerialization.tpp#L26 solves the issue.
#include <iostream>
I got compilation error when building on Ubuntu 18.04
Adding
#include <iostream>
before https://github.com/stulp/dmpbbo/blob/6bcb76d835c8a05680cbf7b0be16d59e0836846b/src/dmpbbo_io/EigenBoostSerialization.tpp#L26 solves the issue.