2021-11-14
今天在安装Quickvina2和Quickvina-W(https://github.com/QVina/QVina.github.io)的时候,要求安装BOOST库。
下载BOOST(wget https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/),编译时使用命令:
./bootstrap.sh --with-toolset=gcc
报错:
A C++11 capable compiler is required for building the B2 engine.
Toolset 'gcc' does not appear to support C++11.
使用gcc来支持C++11编译,检查gcc版
gcc -v
显示:
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)
gcc-4.8以上都支持编译C++11,故没问题
检查g++版本,发现未安装g++,遂安装:
sudo apt-get install g++
安装完成
重新安装BOOST库:
./bootstrap.sh --with-toolset=gcc
成功,继续:
./b2
安装成功
继续安装Qvina2和Qvina-W
依据md文件说明,修改Makefile中前两行为:
BASE=/home/larkin/software/boost_1_77_0/stage/lib
BOOST_VERSION=1_77_0
make
报错:
makedepend: not found
solution:
apt-get install xutils-dev
solved
再次
make
报错:
src/main/main.cpp:28:10: fatal error: boost/program_options.hpp: No such file or directory
28 | #include <boost/program_options.hpp>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:36: main.o] Error 1
最终还是没解决…