简体   繁体   English

Boost C ++库版本问题

[英]Boost C++ library Version Issue

After downloading and untar the file "boost_1_56_0.tar.gz", I have installed Boost C++ library version "boost_1_56_0" in CentOS Linux. 下载并解压缩文件“ boost_1_56_0.tar.gz”后,我在CentOS Linux中安装了Boost C ++库版本“ boost_1_56_0”。

I have run the following commands to install: 我已经运行以下命令进行安装:

sudo ./bootstrap.sh --prefix=/usr/local
sudo ./b2 install.

I also added two paths to the PATH variable: 我还向PATH变量添加了两个路径:

export PATH=$PATH:/usr/local/include/:/usr/local/lib/

It has been successfully installed. 已成功安装。 However when I checked the version it showed different version: 但是,当我检查版本时,它显示了不同的版本:

$ cat /usr/include/boost/version.hpp | grep "BOOST_LIB_VERSION"

#define BOOST_LIB_VERSION "1_33_1"

I have tried to install boost_1_55_0 as well in another folder but unfortunately still it shows version 1_33_1. 我尝试将boost_1_55_0也安装在另一个文件夹中,但不幸的是它仍然显示版本1_33_1。

Can anyone here tell me how I can fix this issue? 有人可以告诉我如何解决此问题吗?

Because of this issue, I am unable to configure Graph_tool; 由于这个问题,我无法配置Graph_tool。 it shows following error: 它显示以下错误:

checking for boostlib >= 1.53.0... configure: error: We could not detect the boost libraries (version 1.53 or higher). 正在检查boostlib> = 1.53.0 ...配置:错误:我们无法检测到Boost库(1.53或更高版本)。 If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option. 如果您具有分阶段的Boost库(仍未安装),请在您的环境中指定$ BOOST_ROOT,并且不要给--with-boost选项提供PATH。 If you are sure you have boost installed, then check your version number looking in . 如果您确定已安装Boost,请在中查看您的版本号。 See http://randspringer.de/boost for more documentation> 有关更多文档,请参见http://randspringer.de/boost >

Your bootstrap path is /usr/local . 您的引导路径为/usr/local Make sure your BOOST_ROOT points to your bootstrapped folder, not the installed 1.33 version. 确保您的BOOST_ROOT指向您的引导文件夹,而不是已安装的1.33版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM