如何为新安装的 Boost 添加编译器包含路径和链接器库路径? [英] How to add compiler include paths and linker library paths for newly installed Boost?
问题描述
我有 RHEL 5.2,安装了 Boost 1.33.我下载了 boost_1_44_0.tar.bz2.并建造了它.完成后显示:
I have RHEL 5.2, with Boost 1.33 installed. I downloaded boost_1_44_0.tar.bz2. and built it. On completion it showed:
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
/home/dfe/Archive/boost_1_44_0
The following directory should be added to linker library paths:
/home/dfe/Archive/boost_1_44_0/stage/lib
- 如何添加上述包含路径?
- 当我执行rpm -q boost"时,它显示 boost-1.33.1-10.el5.为什么会这样,当我安装了 1.44 版时?
- 是否有更好的方法来安装最新版本的 Boost?
推荐答案
首先,我使用
rpm -e boost-1.33.1-10.el5
显示一条消息错误:boost"指定多个包"
A message is displayed saying "error: "boost" specifies multiple packages"
然后尝试:
rpm -e --allmatches boost
(我不记得我输入的是boost"还是boost-1.33.1-10.el5")
(I don't remember whether I typed 'boost' or 'boost-1.33.1-10.el5')
显示了具有依赖项的包.我做到了:
The packages with dependencies were shown. I did:
rpm -e [packagename1]
rpm -e [packagename2]
依此类推,然后做了:
rpm -e --allmatches
这完全从我的系统中删除了提升.
This erased boost completely from my system.
然后我使用 tar -xvjf boost_1_44_0.tar.bz2 提取 boost_1_44_0.tar.bz2 并运行引导程序:
Then I extracted boost_1_44_0.tar.bz2 using tar -xvjf boost_1_44_0.tar.bz2 and ran bootstrap with:
./bootstrap.sh
然后运行 bjam 为:
Then ran bjam as:
./bjam install
就是这样!Boost 已安装在我的系统上,我不必在编译程序时指定任何链接器选项!耶!现在'rpm -q boost'命令显示没有安装包.
That's it! Boost got installed on my system, and I didn't have to specify any of the linker options while compiling programs! Yay! Now the 'rpm -q boost' command shows that there is no package installed.
这篇关于如何为新安装的 Boost 添加编译器包含路径和链接器库路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!