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 ../../../