Linux Boost installation

Source: Internet
Author: User

sudo apt-get install Libboost-dev

However, after I installed this, there were a lot of errors in compiling the program, and all the errors in the system files. I started to think it was my boost library version was wrong, and later changed several versions, the same problem occurred. Later, I compiled a boost.1.42. Then the program passed smoothly. I thought about it later, probably because the boost from the above command was installed by default and did not turn on MPI when compiling the package. And my program needs this feature. Here are the brief steps for the installation (I compiled boost1.42 and boost1.50, both of which are installed in the same way, and later for example): www.2cto.com 1. Download boost1.53 source file (93.56M)/HTTP/ SOURCEFORGE.NET/PROJECTS/BOOST/FILES/LATEST/DOWNLOAD?SOURCE=DLP 2. After decompression, enter the Boost_1_53_0 directory, execute:./bootstrap.sh 3. (emphasis) Modify the Tools/build/v2/user-config.jam file, with the following line "using MPI;"  (Note that there is a space behind the MPI, then a semicolon) 4. Implementation:./B2 5. Execute: sudo./b2 install above is the whole installation process, because the online mentioned more, so here withheld. The point is to mention the third step, be sure to remember. However, it doesn't matter if your program doesn't need the MPI feature. Apply the default settings. Moreover, the fourth step, the implementation can be at the back of the home prefix parameters, if not added, installed, the default header file in the/usr/local/include/boost directory. The library file is in the/usr/local/lib/directory.       Not modified by default. If the program is compiled and you are prompted to fail to load a library file at run time, then all the Boost library files under/usr/local/lib will be MV to the/usr/lib directory.

Linux Boost installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.