Install the boost environment in ubuntu -- the first method is applicable successfully.

Source: Internet
Author: User
Ubuntu to install the boost environment-the first applicable to the successful boost version: boost_rj52_0ubuntu version: ubuntu-12.04.1-desktop-i386 here there are two ways to install: The first: is the simplest: Enter the linux system, input # apt-cach... install the boost environment under ubuntu -- the first applicable to the successful boost version: boost_rj52_0ubuntu version: ubuntu-12.04.1-desktop-i386 here there are two ways to install: ================ first: it is also the simplest: after entering the linux system, enter # apt-cache search boost and you will see a lot of file information, you will see a file called libboost-dev, which can be directly installed: # apt-get install libboost-dev. This speed is very fast because the lib file is directly copied to the system. You can use the final code in this article to test whether the installation is successful or not. ================= Second: this is slow because you need to compile the lib library by yourself. First download the boost library from the website www.boost.org to download the linux boost library. There are two formats: 1). bz2 2). gz I ended with gz. Put it in the linux file system. Here we assume it is the first step of/usr/local/boost_000052_0.tar.gz: decompress the compressed package. the command is as follows (# is only the starting flag and is ignored when you press the Command ): # cd/usr/local/# tar-zxvf boost_1_52_0.tar.gz Step 2: decompress the package and obtain the boost_1_52_0 folder. run the following command: # cd boost_1_52_0 /#. /bootstrap. sh // This command is similar to step 3 of environment configuration: run the Step 2 command to get a file named bjam and run the File :#. /bjam // it may take 10 minutes to complete the installation. Step 4: Check whether the installation is successful: create test. cpp # include in any directory in linux # Include Int main () {int a = boost: lexical_cast ("123456"); std: cout <a <
Related Article

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.