编译EOS时出现以下错误
Scanning dependencies of target print_floats
......
[ 76%] Linking CXX executable print_floats
CMakeFiles/print_floats.dir/print_floats.cpp.o: In function `boost::program_options::typed_value<unsigned int, char>::name[abi:cxx11]() const':
print_floats.cpp: **undefined reference to `boost::program_options::arg[abi:cxx11]'**
......
print_floats.cpp:**undefined reference to `boost::program_options::validation_error::get_template[abi:cxx11]**(boost::program_options::validation_error::kind_t)'
print_floats.cpp:**undefined reference to `boost::program_options::options_description::m_default_line_length'**
print_floats.cpp:**undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'**
print_floats.cpp:**undefined reference to `boost::program_options::options_description::add_options()'**
print_floats.cpp:**undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'**
print_floats.cpp:**undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)'**
......
collect2: error: ld returned 1 exit status
make[2]: *** [tools/print_floats] Error 1
make[1]: *** [tools/CMakeFiles/print_floats.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 76%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/sha512.cpp.o
[ 76%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/dh.cpp.o
[ 76%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/blowfish.cpp.o
原因是之前手动安装过boost,但安装的不正确,或者文件缺失
解决方案,清理掉所有本地的boost文件,重新运行编译EOS,会自动下载依赖
cd ~/opt/
rm -rf boost*
cd eos_dir
rm -rf build
问题收集自 eosfans
版权属于:区块链中文技术社区 / 转载原创者
本文链接:https://www.bcskill.com/index.php/archives/359.html
相关技术文章仅限于相关区块链底层技术研究,禁止用于非法用途,后果自负!本站严格遵守一切相关法律政策!