I am trying to build an executable for a project that uses boost, on my machine (Ubuntu 12.04 LTS) and on node (CentOS) on a cluster system. I managed to install boost from source on both the machines. When I run the make
command, I am able to get an executable for my project on my machine but not on the node. On the cluster node, it says:
source/MainCompressor.cpp: In member function ‘void MainCompressor::compress(std::__cxx11::string, std::__cxx11::string)’:
source/MainCompressor.cpp:76:80: error: ‘boost::filesystem::basic_path<std::__cxx11::basic_string<char>, boost::filesystem::path_traits>::string_type {aka class std::__cxx11::basic_string<char>}’ has no member named ‘string’
boost::filesystem::copy_file(reference, outpath + reference.filename().string());
^
source/MainCompressor.cpp:93:49: error: ‘boost::filesystem::basic_path<std::__cxx11::basic_string<char>, boost::filesystem::path_traits>::string_type {aka class std::__cxx11::basic_string<char>}’ has no member named ‘string’
compList << outpath << reference.filename().string() << endl;
^
source/MainCompressor.cpp:99:47: error: ‘boost::filesystem::basic_path<std::__cxx11::basic_string<char>, boost::filesystem::path_traits>::string_type {aka class std::__cxx11::basic_string<char>}’ has no member named ‘string’
string filename = filepath.filename().string();
^
source/MainCompressor.cpp: In member function ‘void MainCompressor::decompress(std::__cxx11::string, std::__cxx11::string)’:
source/MainCompressor.cpp:171:47: error: ‘boost::filesystem::basic_path<std::__cxx11::basic_string<char>, boost::filesystem::path_traits>::string_type {aka class std::__cxx11::basic_string<char>}’ has no member named ‘string’
string filename = filepath.filename().string();
I installed the same version(s) of boost (1.55 and 1.59) on both the machines. I am not sure why I am not getting the error on my machine but getting an error on the node. Any help will be appreciated in this regard.
Edit 1: The following is my path variable setting:
PATH=/home/head/cmp/soft/sft/boost_1_59_0:/home/head/cmp/soft/sft/boost_1_55_0/bin:/home/head/cmp/soft/sft/gcc/bin:$PATH