Getting started with TBB

I downloaded the TBB documentation and the Commercial Aligned Release. First, I unpacked the source archive (tbb20_014oss_src.tar.gz) into the directory C:\llpanorama\TBB. Then I unpacked the Windows binaries (tbb20_014oss_win.tar.gz) and copied its ia32 subdirectory into the top level of the source directory.

At this point, I created the environment variable TBB20_INSTALL_DIR and set it to C:\llpanorama\TBB\tbb20_014oss_src.  I needed to do this manually to get TBB working under Vista.

I downloaded and installed the free Visual C++ 2005 Express Edition to use with TBB. After installing that, I downloaded and installed the Microsoft Assembler which is also needed to build TBB. Because the Visual C++ 2005 Express Edition only supports .NET applications by default, I also needed to install the Microsoft Platform SDK so I could create Win32 applications. Don’t neglect to do the things listed in steps 3, 4 and 5 after installing the SDK! I also wanted to be able to use the VC++ compiler from the command line, so I used the paths from step 3 to modify the PATH, INCLUDE and LIB variables in the C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat file as shown below. (I know you can’t see the entire line, but you can select-copy-paste them into your own vsvars32.bat file and you should get all of it.)

@set PATH=C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\BIN;C:\Program Files\Microsoft Visual Studio 8\Common7\Tools;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\VCPackages;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin;%PATH%
@set INCLUDE=C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include;%INCLUDE%
@set LIB=C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib;%LIB%

I also installed MinGW make (version 3.80) on my system so I could run the TBB makefile.

After all that was installed and patched together, I went to the C:\llpanorama\TBB\tbb20_014oss_src directory, opened a command window and issued the commands:

C:> vsvars32.bat
C:> make

The first command initialized all the environment variables for the command-line version of the VC++ compiler. The second started the build process for the TBB libraries and then compiled and ran a suite of test programs. This completed without any errors, so I figured I’d set up everything correctly.

Next, I read the Getting Started Guide for TBB and it described how to build an example application. Rather than type all that in, I just jumped to the directory for this example at …\tbb20_014oss_src\examples\GettingStarted\sub_string_finder\vc8. Double-clicking the sub_string_finder.sln file brought up the VC++ 2005 window. I built the sub_string_finder project and ran it successfully.

So now I’m ready to begin using TBB.

About dave_vandenbout
President of XESS Corp, a manufacturer of FPGA development boards.

4 Responses to Getting started with TBB

  1. Pingback: Upgrading to tbb20_017oss « /// Parallelism Panorama ///

  2. llpanorama says:

    Thanks for the mention on your blog, Kevin!

    Hopefully this entry will save some people from following the blind alleys I did. For example, I started with VC++ 2008 Express Edition but the make process aborted because the Microsoft assembler was missing. When I downloaded MASM, I found it requires VC++ 2005 before it will install. So I had to backtrack, download and install VC++ 2005. That took hours. Stuff like that really sucks the enthusiasm out of you when you’re trying to start something new…

  3. Pingback: Intel® Software Network Blogs » Nice Tutorial: Getting Started with TBB on Windows

  4. Nice tutorial! I’m going to point people to it from my own TBB blog.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: