TBB: use pre-compiled header files and static libraries

Source: Internet
Author: User

TBB 2.2 provides a uniform header file: TBB. H. You can use all the TBB libraries as long as the file is included. You can use the following commands to create a static library for ease of use:

#1. Download tbb22_20090908oss_src.tgz and go

Http://www.threadingbuildingblocks.org

#2. Extract
Tar-zxvf tbb22_20090908oss_src.tgz
CD tbb22_20090908oss

#3. Compile, no need to make directly, many things do not actually need
Make TBB & make tbbmalloc

#4. Compiled Dongdong files have different folder names in different compilers and operating systems under the build directory.
CD build/linux_ia32_gcc_cc4.1.0_libc2.4_kernel2.6.16.46_release

#5. Write a command to package the o file into a static library.
Ar cqs libtbb. A *. o
CP libtbb. ../../../
# Pre-compile the header file
CD ../include/TBB
G ++-o tbb. H. gch-x C ++-header-c tbb. H-g-wall-werror-O2-dndebug
Cp tbb. H. gch TBB. H ../../../
CD ../../../

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.