How to configure Visual Studio Boost
This article mainly introduces how to configure Visual Studio Boost, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
At the time of writing, the environment I used was Windows XP Home Edition + Boost1.33.1 + Visual Studio .NET 2003, which first downloaded the relevant Boost zip file from the home page of Boost. I downloaded boost_1_33_1.zip, assuming that we extracted it to the root directory of disk D. The unzipped directory structure should be similar to boost_1_33_1-boost-doc-libs-more and so on.
Open Visual Studio .NET 2003 Select menu tools-- > options-- > Project-- > VC++ directory, and in the include Files directory, add a line, such as: d:\ boost_1_33_1. This way you can use most Boost class libraries. Now let's write a Mini Program and feel the Boost.
# include # include # include using namespace boost; using namespace std; int main (int argc, char * argv []) {vector v1; vector::const_iterator ci_v1; int iLength = 0; while (iLength
< 10 ) { try { if ( iLength == 5 ) v1.push_back(lexical_cast("DukeJoe")) ; else v1.push_back(lexical_cast(iLength)); } catch(bad_lexical_cast &ex) { cout 项目-->VC++ directory, add the directory d:\ boost_libs to the "library file" so that VS2003 will search this directory when it links.
Thank you for reading this article carefully. I hope the article "how to configure Visual Studio Boost" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!