In Windows
Compile boost C ++
Library
I am afraid that I will forget it later. It is also a reference for beginners. Use vc8.0 and boost1.35.0.1) Download boostHttp://www.boost.org/users/download/this is the local download page. Download 2 pictures:Packaged releasesVersion 1.35.0AndBoost jam 3.1.16 You need to find the words details | download under each entry and click Download To Go To The download page. Unfortunately, the SourceForge site is blocked, so you usually cannot download it. (I cursed the person who blocked the website ). Therefore, it is necessary to use some special tools to penetrate this blocking. I downloaded this: boost_1_35_0.tar.gzand boost-jam-3.1.16.zip.2) Download python2.5.2Http://www.python.org/download/on this page, click python2.5.2 Windows installer to get a python2.5.2.msi, and then click Install. I installed it in C:/opensource/python25 to create a batch file: PT. BAT, the content is as follows: Set Path = C:/opensource/python25python then start the command line tool (run cmd.exe) and enter PT. bat directory, Type PT. bat if you see the prompt symbol>, it indicates that python is successfully installed.3) Compile boost-jamDecompress boost_1_35_0.tar.gz to the boost_1_35_0 directory. My website is in C:/opensource/boost_1_35_0. So you can find the boost-build.jam file under C:/opensource/boost_1_35_0. Decompress boost-jam-3.1.16.zip, and then double-click build. bat under the directory to compile. After compilation, bin. ntx86/bjam.exe is generated. We want to copy this bjam.exe to the boost_1_35_0 directory where there is a boost-build.jam file.4) Fully compiled boost_1_35_0Compile all databases. Although you can only compile a part of it, it is still necessary to compile all of it, saving you trouble in the future. To solve this problem, you need to write a batch processing file. I name it boost. BAT: Set msvc_root = "F:/Microsoft Visual Studio 8/VC" set VisualC = "F:/Microsoft Visual Studio 8/VC" set jam_toolset = visualcset python_root = C: /opensource/python25set python_version = 2.5.2set Path = C:/opensource/boost_1_35_0 ensure that your path is set correctly. Then save the file to C:/opensource. (In fact, the location is not important ). Then enable the command line tool (CMD ). Similarly, enter the following command (<enter> enter): C:/opensource>Boost. bat<Enter> C:/opensource>CD boost_000035_0<Enter> C:/opensource/boost_1_35_0>Bjam-sboost_root =.-stools = msvc<Enter> wait. Don't worry about a lot of warnings. It is estimated that the compilation will be completed in less than one hour. You can find the following occurs on drive C:C:/BoostIt contains the include and Lib directories. You can use this c:/boost to use its static or dynamic library. You can also useC:/opensource/boost_000035_0Source code.5) The end is also the start of boostJourneyNow, let's start your boost journey. I used its graph library to implement the shortest path. The whole road network in Shanghai, with more than 40 thousand road sections, can query the shortest path at any 2 points, no more than 3 seconds. The memory consumption is about 30 mb. Since then, I like boost. The latest boost provides C ++ and Python interfaces, which is why I want to use it. A simple analogy: C ++ is like COM and python is like JavaScript. If you think JavaScript calls to com can generate powerful power, it is an atomic bomb, then Python calls C ++, which is a hydrogen bomb. For more information about boost. Python, refer