[mlpack-git] [mlpack] I'm trying to execute this simple program. I'm getting an error while compiling. I'm compiling using g++ simple.cpp -I /usr/local/include -L /usr/local/lib -lmlpack. Here I'm attaching the program and log file after compiling. (#503)

vamshikumarkurva notifications at github.com
Tue Jan 19 06:14:05 EST 2016


log file while compiling:
In file included from /usr/include/c++/4.8/unordered_map:35:0,
                 from /usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:23,
                 from /usr/local/include/mlpack/prereqs.hpp:57,
                 from /usr/local/include/mlpack/core.hpp:187,
                 from ../main.cpp:9:
/usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support for the \
  ^
In file included from /usr/local/include/mlpack/prereqs.hpp:57:0,
                 from /usr/local/include/mlpack/core.hpp:187,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:98:11: error: ‘unordered_map’ in namespace ‘std’ does not name a type
     const std::unordered_map<
           ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:98:29: error: expected ‘,’ or ‘...’ before ‘<’ token
     const std::unordered_map<
                             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp: In function ‘void boost::serialization::save(Archive&, int)’:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:105:9: error: ‘unordered_map’ is not a member of ‘std’
         std::unordered_map<
         ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:105:9: error: ‘unordered_map’ is not a member of ‘std’
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:103:32: error: parse error in template argument list
     boost::serialization::stl::save_unordered_collection<
                                ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:108:11: error: ‘t’ was not declared in this scope
     >(ar, t);
           ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp: At global scope:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:120:10: error: ‘std::unordered_map’ has not been declared
     std::unordered_map<
          ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:120:23: error: expected ‘,’ or ‘...’ before ‘<’ token
     std::unordered_map<
                       ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp: In function ‘void boost::serialization::load(Archive&, int)’:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:127:9: error: ‘unordered_map’ is not a member of ‘std’
         std::unordered_map<
         ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:127:9: error: ‘unordered_map’ is not a member of ‘std’
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:125:32: error: parse error in template argument list
     boost::serialization::stl::load_unordered_collection<
                                ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:132:13: error: ‘unordered_map’ is not a member of ‘std’
             std::unordered_map<
             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:132:13: error: ‘unordered_map’ is not a member of ‘std’
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:134:13: error: wrong number of template arguments (5, should be 2)
             >
             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:37:8: error: provided for ‘template<class Archive, class Container> struct boost::serialization::stl::archive_input_unordered_map’
 struct archive_input_unordered_map
        ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:136:5: error: expected primary-expression before ‘>’ token
     >(ar, t);
     ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:136:11: error: ‘t’ was not declared in this scope
     >(ar, t);
           ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp: At global scope:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:150:10: error: ‘std::unordered_map’ has not been declared
     std::unordered_map<
          ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:150:23: error: expected ‘,’ or ‘...’ before ‘<’ token
     std::unordered_map<
                       ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp: In function ‘void boost::serialization::serialize(Archive&, int)’:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:155:42: error: ‘t’ was not declared in this scope
     boost::serialization::split_free(ar, t, file_version);
                                          ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:155:45: error: ‘file_version’ was not declared in this scope
     boost::serialization::split_free(ar, t, file_version);
                                             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp: At global scope:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:168:11: error: ‘unordered_multimap’ in namespace ‘std’ does not name a type
     const std::unordered_multimap<
           ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:168:34: error: expected ‘,’ or ‘...’ before ‘<’ token
     const std::unordered_multimap<
                                  ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:166:13: error: redefinition of ‘template<class Archive, class Key, class HashFcn, class EqualKey, class Allocator> void boost::serialization::save(Archive&, int)’
 inline void save(
             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:96:13: error: ‘template<class Archive, class Key, class HashFcn, class EqualKey, class Allocator> void boost::serialization::save(Archive&, int)’ previously declared here
 inline void save(
             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp: In function ‘void boost::serialization::save(Archive&, int)’:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:175:9: error: ‘unordered_multimap’ is not a member of ‘std’
         std::unordered_multimap<
         ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:175:9: error: ‘unordered_multimap’ is not a member of ‘std’
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:173:32: error: parse error in template argument list
     boost::serialization::stl::save_unordered_collection<
                                ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:178:11: error: ‘t’ was not declared in this scope
     >(ar, t);
           ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp: At global scope:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:190:10: error: ‘std::unordered_multimap’ has not been declared
     std::unordered_multimap<
          ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:190:28: error: expected ‘,’ or ‘...’ before ‘<’ token
     std::unordered_multimap<
                            ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:188:13: error: redefinition of ‘template<class Archive, class Key, class HashFcn, class EqualKey, class Allocator> void boost::serialization::load(Archive&, int)’
 inline void load(
             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:118:13: error: ‘template<class Archive, class Key, class HashFcn, class EqualKey, class Allocator> void boost::serialization::load(Archive&, int)’ previously declared here
 inline void load(
             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp: In function ‘void boost::serialization::load(Archive&, int)’:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:197:9: error: ‘unordered_multimap’ is not a member of ‘std’
         std::unordered_multimap<
         ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:197:9: error: ‘unordered_multimap’ is not a member of ‘std’
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:195:32: error: parse error in template argument list
     boost::serialization::stl::load_unordered_collection<
                                ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:202:13: error: ‘unordered_multimap’ is not a member of ‘std’
             std::unordered_multimap<
             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:202:13: error: ‘unordered_multimap’ is not a member of ‘std’
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:204:13: error: wrong number of template arguments (5, should be 2)
             >
             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:64:8: error: provided for ‘template<class Archive, class Container> struct boost::serialization::stl::archive_input_unordered_multimap’
 struct archive_input_unordered_multimap
        ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:206:5: error: expected primary-expression before ‘>’ token
     >(ar, t);
     ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:206:11: error: ‘t’ was not declared in this scope
     >(ar, t);
           ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp: At global scope:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:220:10: error: ‘std::unordered_multimap’ has not been declared
     std::unordered_multimap<
          ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:220:28: error: expected ‘,’ or ‘...’ before ‘<’ token
     std::unordered_multimap<
                            ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:218:13: error: redefinition of ‘template<class Archive, class Key, class HashFcn, class EqualKey, class Allocator> void boost::serialization::serialize(Archive&, int)’
 inline void serialize(
             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:148:13: error: ‘template<class Archive, class Key, class HashFcn, class EqualKey, class Allocator> void boost::serialization::serialize(Archive&, int)’ previously declared here
 inline void serialize(
             ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp: In function ‘void boost::serialization::serialize(Archive&, int)’:
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:225:42: error: ‘t’ was not declared in this scope
     boost::serialization::split_free(ar, t, file_version);
                                          ^
/usr/local/include/mlpack/core/boost_backport/unordered_map.hpp:225:45: error: ‘file_version’ was not declared in this scope
     boost::serialization::split_free(ar, t, file_version);
                                             ^
In file included from /usr/local/include/mlpack/prereqs.hpp:66:0,
                 from /usr/local/include/mlpack/core.hpp:187,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/serialization_shim.hpp: At global scope:
/usr/local/include/mlpack/core/data/serialization_shim.hpp:48:56: error: ‘>>’ should be ‘> >’ within a nested template argument list
             typename boost::enable_if<boost::is_class<U>>::type*,
                                                        ^
/usr/local/include/mlpack/core/data/serialization_shim.hpp:49:61: error: ‘>>’ should be ‘> >’ within a nested template argument list
             typename boost::enable_if<HasSerializeFunction<U>>::type*>*);
                                                             ^
/usr/local/include/mlpack/core/data/serialization_shim.hpp:91:45: error: ‘>>’ should be ‘> >’ within a nested template argument list
     typename boost::enable_if<HasSerialize<T>>::type* = 0)
                                             ^
/usr/local/include/mlpack/core/data/serialization_shim.hpp:125:46: error: ‘>>’ should be ‘> >’ within a nested template argument list
     typename boost::disable_if<HasSerialize<T>>::type* = 0,
                                              ^
/usr/local/include/mlpack/core/data/serialization_shim.hpp:126:51: error: ‘>>’ should be ‘> >’ within a nested template argument list
     typename boost::disable_if<boost::is_pointer<T>>::type* = 0)
                                                   ^
/usr/local/include/mlpack/core/data/serialization_shim.hpp:160:45: error: ‘>>’ should be ‘> >’ within a nested template argument list
     typename boost::enable_if<HasSerialize<T>>::type* = 0)
                                             ^
/usr/local/include/mlpack/core/data/serialization_shim.hpp:195:46: error: ‘>>’ should be ‘> >’ within a nested template argument list
     typename boost::disable_if<HasSerialize<T>>::type* = 0)
                                              ^
/usr/local/include/mlpack/core/data/serialization_shim.hpp:212:45: error: ‘>>’ should be ‘> >’ within a nested template argument list
     typename boost::enable_if<HasSerialize<T>>::type* = 0)
                                             ^
/usr/local/include/mlpack/core/data/serialization_shim.hpp:229:46: error: ‘>>’ should be ‘> >’ within a nested template argument list
     typename boost::disable_if<HasSerialize<T>>::type* = 0)
                                              ^
In file included from /usr/local/include/mlpack/core/data/load.hpp:17:0,
                 from /usr/local/include/mlpack/core.hpp:193,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/dataset_info.hpp:79:3: error: ‘unordered_map’ in namespace ‘std’ does not name a type
   std::unordered_map<size_t, std::pair<boost::bimap<std::string, size_t>,
   ^
/usr/local/include/mlpack/core/data/dataset_info.hpp: In member function ‘void mlpack::data::DatasetInfo::Serialize(Archive&, unsigned int)’:
/usr/local/include/mlpack/core/data/dataset_info.hpp:72:26: error: ‘maps’ was not declared in this scope
     ar & data::CreateNVP(maps, "maps");
                          ^
In file included from /usr/local/include/mlpack/core/data/dataset_info.hpp:87:0,
                 from /usr/local/include/mlpack/core/data/load.hpp:17,
                 from /usr/local/include/mlpack/core.hpp:193,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp: In constructor ‘mlpack::data::DatasetInfo::DatasetInfo(size_t)’:
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp:18:27: error: ‘Datatype’ is not a class or namespace
     types(dimensionality, Datatype::numeric)
                           ^
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp: In member function ‘size_t mlpack::data::DatasetInfo::MapString(const string&, size_t)’:
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp:30:7: error: ‘maps’ was not declared in this scope
   if (maps.count(dimension) == 0 ||
       ^
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp:36:26: error: ‘Datatype’ is not a class or namespace
       types[dimension] = Datatype::categorical;
                          ^
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp: In member function ‘const string& mlpack::data::DatasetInfo::UnmapString(size_t, size_t)’:
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp:54:7: error: ‘maps’ was not declared in this scope
   if (maps[dimension].first.right.count(value) == 0)
       ^
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp:62:10: error: ‘maps’ was not declared in this scope
   return maps[dimension].first.right.at(value);
          ^
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp: In member function ‘mlpack::data::Datatype& mlpack::data::DatasetInfo::Type(size_t)’:
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp:82:33: error: ‘Datatype’ is not a class or namespace
     types.resize(dimension + 1, Datatype::numeric);
                                 ^
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp: In member function ‘size_t mlpack::data::DatasetInfo::NumMappings(size_t) const’:
/usr/local/include/mlpack/core/data/dataset_info_impl.hpp:89:11: error: ‘maps’ was not declared in this scope
   return (maps.count(dimension) == 0) ? 0 : maps.at(dimension).second;
           ^
In file included from /usr/local/include/mlpack/core.hpp:193:0,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/load.hpp: At global scope:
/usr/local/include/mlpack/core/data/load.hpp:131:22: error: ‘format’ is not a class or namespace
           format f = format::autodetect);
                      ^
In file included from /usr/local/include/mlpack/core/data/load_arff.hpp:54:0,
                 from /usr/local/include/mlpack/core/data/load_impl.hpp:27,
                 from /usr/local/include/mlpack/core/data/load.hpp:137,
                 from /usr/local/include/mlpack/core.hpp:193,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/load_arff_impl.hpp: In function ‘void mlpack::data::LoadARFF(const string&, arma::Mat<eT>&, mlpack::data::DatasetInfo&)’:
/usr/local/include/mlpack/core/data/load_arff_impl.hpp:23:20: error: no matching function for call to ‘std::basic_ifstream<char>::open(const string&)’
   ifs.open(filename);
                    ^
/usr/local/include/mlpack/core/data/load_arff_impl.hpp:23:20: note: candidate is:
In file included from /usr/include/armadillo:21:0,
                 from /usr/local/include/mlpack/core/arma_extend/arma_extend.hpp:33,
                 from /usr/local/include/mlpack/prereqs.hpp:69,
                 from /usr/local/include/mlpack/core.hpp:187,
                 from ../main.cpp:9:
/usr/include/c++/4.8/fstream:538:7: note: void std::basic_ifstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
       open(const char* __s, ios_base::openmode __mode = ios_base::in)
       ^
/usr/include/c++/4.8/fstream:538:7: note:   no known conversion for argument 1 from ‘const string {aka const std::basic_string<char>}’ to ‘const char*’
In file included from /usr/local/include/mlpack/core/data/load_arff.hpp:54:0,
                 from /usr/local/include/mlpack/core/data/load_impl.hpp:27,
                 from /usr/local/include/mlpack/core/data/load.hpp:137,
                 from /usr/local/include/mlpack/core.hpp:193,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/load_arff_impl.hpp:44:66: error: ‘>>’ should be ‘> >’ within a nested template argument list
       typedef boost::tokenizer<boost::escaped_list_separator<char>> Tokenizer;
                                                                  ^
/usr/local/include/mlpack/core/data/load_arff_impl.hpp:113:22: error: ‘Datatype’ is not a class or namespace
       info.Type(i) = Datatype::categorical;
                      ^
/usr/local/include/mlpack/core/data/load_arff_impl.hpp:115:22: error: ‘Datatype’ is not a class or namespace
       info.Type(i) = Datatype::numeric;
                      ^
/usr/local/include/mlpack/core/data/load_arff_impl.hpp:154:64: error: ‘>>’ should be ‘> >’ within a nested template argument list
     typedef boost::tokenizer<boost::escaped_list_separator<char>> Tokenizer;
                                                                ^
/usr/local/include/mlpack/core/data/load_arff_impl.hpp:163:29: error: ‘Datatype’ is not a class or namespace
       if (info.Type(col) == Datatype::categorical)
                             ^
/usr/local/include/mlpack/core/data/load_arff_impl.hpp:167:34: error: ‘Datatype’ is not a class or namespace
       else if (info.Type(col) == Datatype::numeric)
                                  ^
In file included from /usr/local/include/mlpack/core/data/load.hpp:137:0,
                 from /usr/local/include/mlpack/core.hpp:193,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/load_impl.hpp: In function ‘bool mlpack::data::Load(const string&, arma::Mat<eT>&, mlpack::data::DatasetInfo&, bool, bool)’:
/usr/local/include/mlpack/core/data/load_impl.hpp:350:64: error: ‘>>’ should be ‘> >’ within a nested template argument list
     typedef boost::tokenizer<boost::escaped_list_separator<char>> Tokenizer;
                                                                ^
/usr/local/include/mlpack/core/data/load_impl.hpp:379:43: error: no matching function for call to ‘std::basic_fstream<char>::open(const string&, const openmode&)’
     stream.open(filename, std::fstream::in);
                                           ^
/usr/local/include/mlpack/core/data/load_impl.hpp:379:43: note: candidate is:
In file included from /usr/include/armadillo:21:0,
                 from /usr/local/include/mlpack/core/arma_extend/arma_extend.hpp:33,
                 from /usr/local/include/mlpack/prereqs.hpp:69,
                 from /usr/local/include/mlpack/core.hpp:187,
                 from ../main.cpp:9:
/usr/include/c++/4.8/fstream:886:7: note: void std::basic_fstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
       open(const char* __s,
       ^
/usr/include/c++/4.8/fstream:886:7: note:   no known conversion for argument 1 from ‘const string {aka const std::basic_string<char>}’ to ‘const char*’
In file included from /usr/local/include/mlpack/core/data/load.hpp:137:0,
                 from /usr/local/include/mlpack/core.hpp:193,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/load_impl.hpp:411:35: error: ‘Datatype’ is not a class or namespace
             if (info.Type(dim) == Datatype::numeric)
                                   ^
/usr/local/include/mlpack/core/data/load_impl.hpp: In function ‘bool mlpack::data::Load(const string&, const string&, T&, bool, mlpack::data::format)’:
/usr/local/include/mlpack/core/data/load_impl.hpp:508:12: error: ‘format’ is not a class or namespace
   if (f == format::autodetect)
            ^
/usr/local/include/mlpack/core/data/load_impl.hpp:513:11: error: ‘format’ is not a class or namespace
       f = format::xml;
           ^
/usr/local/include/mlpack/core/data/load_impl.hpp:515:11: error: ‘format’ is not a class or namespace
       f = format::binary;
           ^
/usr/local/include/mlpack/core/data/load_impl.hpp:517:11: error: ‘format’ is not a class or namespace
       f = format::text;
           ^
/usr/local/include/mlpack/core/data/load_impl.hpp:539:39: error: no matching function for call to ‘std::basic_ifstream<char>::open(const string&, const openmode&)’
   ifs.open(filename, std::ifstream::in);
                                       ^
/usr/local/include/mlpack/core/data/load_impl.hpp:539:39: note: candidate is:
In file included from /usr/include/armadillo:21:0,
                 from /usr/local/include/mlpack/core/arma_extend/arma_extend.hpp:33,
                 from /usr/local/include/mlpack/prereqs.hpp:69,
                 from /usr/local/include/mlpack/core.hpp:187,
                 from ../main.cpp:9:
/usr/include/c++/4.8/fstream:538:7: note: void std::basic_ifstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
       open(const char* __s, ios_base::openmode __mode = ios_base::in)
       ^
/usr/include/c++/4.8/fstream:538:7: note:   no known conversion for argument 1 from ‘const string {aka const std::basic_string<char>}’ to ‘const char*’
In file included from /usr/local/include/mlpack/core/data/load.hpp:137:0,
                 from /usr/local/include/mlpack/core.hpp:193,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/load_impl.hpp:556:14: error: ‘format’ is not a class or namespace
     if (f == format::xml)
              ^
/usr/local/include/mlpack/core/data/load_impl.hpp:561:19: error: ‘format’ is not a class or namespace
     else if (f == format::text)
                   ^
/usr/local/include/mlpack/core/data/load_impl.hpp:566:19: error: ‘format’ is not a class or namespace
     else if (f == format::binary)
                   ^
In file included from /usr/local/include/mlpack/core.hpp:194:0,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/save.hpp: At global scope:
/usr/local/include/mlpack/core/data/save.hpp:86:22: error: ‘format’ is not a class or namespace
           format f = format::autodetect);
                      ^
In file included from /usr/local/include/mlpack/core/data/save.hpp:92:0,
                 from /usr/local/include/mlpack/core.hpp:194,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/save_impl.hpp: In function ‘bool mlpack::data::Save(const string&, const string&, T&, bool, mlpack::data::format)’:
/usr/local/include/mlpack/core/data/save_impl.hpp:180:12: error: ‘format’ is not a class or namespace
   if (f == format::autodetect)
            ^
/usr/local/include/mlpack/core/data/save_impl.hpp:185:11: error: ‘format’ is not a class or namespace
       f = format::xml;
           ^
/usr/local/include/mlpack/core/data/save_impl.hpp:187:11: error: ‘format’ is not a class or namespace
       f = format::binary;
           ^
/usr/local/include/mlpack/core/data/save_impl.hpp:189:11: error: ‘format’ is not a class or namespace
       f = format::text;
           ^
/usr/local/include/mlpack/core/data/save_impl.hpp:212:40: error: no matching function for call to ‘std::basic_ofstream<char>::open(const string&, const openmode&)’
   ofs.open(filename, std::ofstream::out);
                                        ^
/usr/local/include/mlpack/core/data/save_impl.hpp:212:40: note: candidate is:
In file included from /usr/include/armadillo:21:0,
                 from /usr/local/include/mlpack/core/arma_extend/arma_extend.hpp:33,
                 from /usr/local/include/mlpack/prereqs.hpp:69,
                 from /usr/local/include/mlpack/core.hpp:187,
                 from ../main.cpp:9:
/usr/include/c++/4.8/fstream:713:7: note: void std::basic_ofstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
       open(const char* __s,
       ^
/usr/include/c++/4.8/fstream:713:7: note:   no known conversion for argument 1 from ‘const string {aka const std::basic_string<char>}’ to ‘const char*’
In file included from /usr/local/include/mlpack/core/data/save.hpp:92:0,
                 from /usr/local/include/mlpack/core.hpp:194,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/data/save_impl.hpp:229:14: error: ‘format’ is not a class or namespace
     if (f == format::xml)
              ^
/usr/local/include/mlpack/core/data/save_impl.hpp:234:19: error: ‘format’ is not a class or namespace
     else if (f == format::text)
                   ^
/usr/local/include/mlpack/core/data/save_impl.hpp:239:19: error: ‘format’ is not a class or namespace
     else if (f == format::binary)
                   ^
In file included from /usr/local/include/mlpack/core.hpp:197:0,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/math/random.hpp: At global scope:
/usr/local/include/mlpack/core/math/random.hpp:16:8: error: ‘mt19937’ in namespace ‘std’ does not name a type
 extern std::mt19937 randGen;
        ^
/usr/local/include/mlpack/core/math/random.hpp:18:8: error: ‘uniform_real_distribution’ in namespace ‘std’ does not name a type
 extern std::uniform_real_distribution<> randUniformDist;
        ^
/usr/local/include/mlpack/core/math/random.hpp:20:8: error: ‘normal_distribution’ in namespace ‘std’ does not name a type
 extern std::normal_distribution<> randNormalDist;
        ^
/usr/local/include/mlpack/core/math/random.hpp: In function ‘void mlpack::math::RandomSeed(size_t)’:
/usr/local/include/mlpack/core/math/random.hpp:31:3: error: ‘randGen’ was not declared in this scope
   randGen.seed((uint32_t) seed);
   ^
/usr/local/include/mlpack/core/math/random.hpp: In function ‘double mlpack::math::Random()’:
/usr/local/include/mlpack/core/math/random.hpp:46:26: error: ‘randGen’ was not declared in this scope
   return randUniformDist(randGen);
                          ^
/usr/local/include/mlpack/core/math/random.hpp:46:33: error: ‘randUniformDist’ was not declared in this scope
   return randUniformDist(randGen);
                                 ^
/usr/local/include/mlpack/core/math/random.hpp: In function ‘double mlpack::math::Random(double, double)’:
/usr/local/include/mlpack/core/math/random.hpp:54:43: error: ‘randGen’ was not declared in this scope
   return lo + (hi - lo) * randUniformDist(randGen);
                                           ^
/usr/local/include/mlpack/core/math/random.hpp:54:50: error: ‘randUniformDist’ was not declared in this scope
   return lo + (hi - lo) * randUniformDist(randGen);
                                                  ^
/usr/local/include/mlpack/core/math/random.hpp: In function ‘int mlpack::math::RandInt(int)’:
/usr/local/include/mlpack/core/math/random.hpp:62:66: error: ‘randGen’ was not declared in this scope
   return (int) std::floor((double) hiExclusive * randUniformDist(randGen));
                                                                  ^
/usr/local/include/mlpack/core/math/random.hpp:62:73: error: ‘randUniformDist’ was not declared in this scope
   return (int) std::floor((double) hiExclusive * randUniformDist(randGen));
                                                                         ^
/usr/local/include/mlpack/core/math/random.hpp: In function ‘int mlpack::math::RandInt(int, int)’:
/usr/local/include/mlpack/core/math/random.hpp:71:50: error: ‘randGen’ was not declared in this scope
                                * randUniformDist(randGen));
                                                  ^
/usr/local/include/mlpack/core/math/random.hpp:71:57: error: ‘randUniformDist’ was not declared in this scope
                                * randUniformDist(randGen));
                                                         ^
/usr/local/include/mlpack/core/math/random.hpp: In function ‘double mlpack::math::RandNormal()’:
/usr/local/include/mlpack/core/math/random.hpp:79:25: error: ‘randGen’ was not declared in this scope
   return randNormalDist(randGen);
                         ^
/usr/local/include/mlpack/core/math/random.hpp:79:32: error: ‘randNormalDist’ was not declared in this scope
   return randNormalDist(randGen);
                                ^
/usr/local/include/mlpack/core/math/random.hpp: In function ‘double mlpack::math::RandNormal(double, double)’:
/usr/local/include/mlpack/core/math/random.hpp:91:36: error: ‘randGen’ was not declared in this scope
   return variance * randNormalDist(randGen) + mean;
                                    ^
/usr/local/include/mlpack/core/math/random.hpp:91:43: error: ‘randNormalDist’ was not declared in this scope
   return variance * randNormalDist(randGen) + mean;
                                           ^
In file included from /usr/local/include/mlpack/core.hpp:203:0,
                 from ../main.cpp:9:
/usr/local/include/mlpack/core/dists/gaussian_distribution.hpp: At global scope:
/usr/local/include/mlpack/core/dists/gaussian_distribution.hpp:34:16: error: ‘constexpr’ does not name a type
   static const constexpr double log2pi = 1.83787706640934533908193770912475883;
                ^
/usr/local/include/mlpack/core/dists/gaussian_distribution.hpp:34:16: note: C++11 ‘constexpr’ only available with -std=c++11 or -std=gnu++11
/usr/local/include/mlpack/core/dists/gaussian_distribution.hpp:138:28: error: expected ‘,’ or ‘...’ before ‘&&’ token
   void Covariance(arma::mat&& covariance);
                            ^
/usr/local/include/mlpack/core/dists/gaussian_distribution.hpp: In member function ‘void mlpack::distribution::GaussianDistribution::LogProbability(const mat&, arma::vec&) const’:
/usr/local/include/mlpack/core/dists/gaussian_distribution.hpp:189:33: error: ‘log2pi’ was not declared in this scope
   logProbabilities = -0.5 * k * log2pi - 0.5 * logDetCov + logExponents;
                                 ^
make: *** [main.o] Error 1

16:27:26 Build Finished (took 5s.175ms)



---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/503#issuecomment-172820342
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160119/e437a548/attachment-0001.html>


More information about the mlpack-git mailing list