一,最簡單的方法:
apt-cache search boost
搜到所有的boost庫
然後:
安裝相應的庫apt-get
install libboost-all-dev
二,編譯安裝,
2.解決依賴關係
如果還不全,就用apt-cache depends ******x查去apt-get
install python-dev gccxml
3.編譯bjam:
#cd /opt/boost_1_47_0
#sudo ./bootstrap.sh
編譯成功
4.編譯boost
#sudo ./bjam
開始編譯
大約要個十幾分鐘
編譯完成後:
the boost c++ libraries were successfully built!
the following directory should be added to compiler include paths:
/home/terry/local/boost_1_47_0
the following directory should be added to linker library paths:
/home/terry/local/boost_1_47_0/stage/lib
因為我是解壓到/home/terry/local/boost_1_46_1下了
所以編譯完了是這樣的
sudo ldconfig
安裝完畢
三,測試使用:
1.測試**
#cat test.cpp
2.編譯,執行#include
#include
intmain()
–g++ -o test test.cpp
#lstest test.cpp
#./test
123456
123.456
Linux系統下安裝c boost開源庫教程
解壓壓縮包 tar xvf boost 1 75 0.tar.bz2安裝boost庫 執行解壓後生成的bootstrap.s 件 cd boost 1 75 0 bootstrap.sh 然後使用b2工具進行安裝 sudo b2 install 安裝完畢之後,標頭檔案預設在 usr local in...
UBUNTU下軟體安裝
先簡單說介紹一下ubuntu。ubuntu的中文發音大約為 烏班圖。ubuntu這個單詞源自非洲,意謂 班圖精神 誰都不是一座孤島,自成一體。每個人都包孕於人類,因他人存在而存在,因他人幸福而幸福。下面介紹下在ubuntu下如何裝軟體。linux系統中,軟體通常以源 或者預編譯包的形式提供。1 軟體...
ubuntu下安裝飛鴿
ubuntu下安裝飛鴿傳書g2ipmsg很麻煩,總是出問題,還需要解決中文支援問題 可參考 如下 其實在ubuntu的源中有個軟體 iptux 信使 可以與windows下的飛鴿傳書 飛秋等工具相容,實現傳送資訊與檔案等功能,安裝十分方面。ubuntu 10.10下安裝iptux的方法 1.安裝。在...