Compile boost1.52 in Ubuntu

Source: Internet
Author: User
Compile boost1.52 under Ubuntu (download boost1.52 to/usr/share/) 1. Compile b2 and bjam executable files using bootstrap. bat. Because the default bootup. the tool in bat is msvc, and ubuntu cannot use msvc, So we modify boostrap. the bat file is as follows: call before modification. \ build. bat % * & gt ;.. \..

Compile boost1.52 under Ubuntu (download boost1.52 to/usr/share)

1. Compile b2 and bjam executable files using bootstrap. bat. Because the default boostrap. bat tool is msvc,
Ubuntu cannot use msvc, So we modify the bootup. bat file as follows:

: Call before modification. \ build. bat % *> .. \.. \.. \.. \ bootstrap. log: call after modification. \ build. bat % * gcc> .. \.. \.. \.. \ bootstrap. log
: Set toolset = msvc: set toolset = gcc after modification

2. the console./bootstrap. sh will compile and generate b2 and bjam executable files on the terminal.


3./b2-a-sHAVE_ICU = 1 #-a parameter, which indicates recompilation, and-sHAVE_ICU = 1 indicates Unicode/ICU is supported.
Note: here we compile all. Of course, you can also choose to compile only a part of it. The option --- Compile only the specified database, for example, input -- with-regex to compile only the regex database. Boost1.49 fully compiled by the author Intel®Core™2 Duo CPU T5750 @ 2.00 GHz X 2, 2G DDR2 memory on the old machine, using the above options, it will be almost half an hour. This time is tolerable. All the compilation and installation work is psychologically comfortable.

4. After the compilation is complete, install the header file and the generated library in the specified path (-- prefix ).

./B2 install

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

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.