欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Boost
来自开放百科 - 灰狐
(版本间的差异)
小 (Boost移动到Boost C++ Libraries) |
|||
第1行: | 第1行: | ||
− | {{SeeWikipedia}} | + | {{top news}} |
+ | {{SeeWikipedia|Boost C++ Libraries}} | ||
“...one of the most highly regarded and expertly designed C++ library projects in the world.” — Herb Sutter and Andrei Alexandrescu, C++ Coding Standards | “...one of the most highly regarded and expertly designed C++ library projects in the world.” — Herb Sutter and Andrei Alexandrescu, C++ Coding Standards |
2010年9月27日 (一) 03:46的版本
您可以在Wikipedia上了解到此条目的英文信息 Boost Thanks, Wikipedia. |
“...one of the most highly regarded and expertly designed C++ library projects in the world.” — Herb Sutter and Andrei Alexandrescu, C++ Coding Standards
Build and Install
wget http://switch.dl.sourceforge.net/sourceforge/boost/boost_1_33_1.tar.gz tar zxvf boost_1_33_1.tar.gz cd boost_1_33_1 #apt-get install bjam // bjam: Software build tool #bjam "-sTOOLS=gcc" install // long time , install to /usr/local/lib
Debian:
// Boost 1_31 deb package apt-get install libboost-date-time-dev apt-get install libboost-filesystem-dev apt-get install libboost-regex-dev apt-get install libboost-serialization-dev apt-get install libboost-test-dev apt-get install libboost-dev apt-get install boost-devel
Examples
#include <boost/lexical_cast.hpp> #include <iostream>
int main() { using boost::lexical_cast; int a = lexical_cast<int>("123"); double b = lexical_cast<double>("123.12"); std::cout<<a<<std::endl; std::cout<<b<<std::endl; return 0; } g++ -o test -I/usr/local/include/boost-1_33_1/ test.cpp g++ -o test -I/usr/include/ test.cpp // use boost 1_32 deb package ./test 123 123.12
Windows
add include path in VC 6.0 : Tools > Options > Directories > include files C:\C-C++\BOOST_1_33_1
Links
<discussion>characters_max=300</discussion>
分享您的观点