Compiling TBB with Visual Studio 2008(orcas)

Compiling TBB with Visual Studio 2008(orcas)

izuleta@stanford.edu's picture

Hi, I am trying to compile the TBB libraries posted as open source with little success. I am aware now that I need a number of unix tools (gmake, etc) to do this. Could someone please post a VS project/solution file to do this automatically?


Thanks!


-ignacio

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Kevin Farnham's picture

Hi Ignacio,

I haven't worked with Visual Studio 2008, but I wrote a blog about a method of building TBB using Visual Studio 2005 that worked for me. My post was titled "One Way to Build Threading Building Blocks on Windows" and the URL is:

http://softwareblogs.intel.com/2007/08/02/one-way-to-build-threading-building-blocks-on-windows/

Kevin Farnham

Alexey Kukanov (Intel)'s picture

The recent development release of TBB added the possibility to build the library with Visual Studio 2008 Beta 2. No special workarounds are required, usual TBB build procedure should work just fine. It means, you still need GNU make that works on Windows. The Make for Windowsfrom the GnuWin32 projectis my personal favourite; Cygwin (as described by Kevin) or other similar packagesshould also work well. Besides GNU make, no other UNIX utilities are required.


The build procedure is approximately the following:



  • ensure the gmake utility and its support libraries (if any) are in PATH;
  • from the Start Menu, launch the appropriate VS 2008 command-line console;

    • the shortcuts for that are located under "Visual Studio Tools"; select "Visual Studio 2008 Beta 2 Command Prompt" to build 32-bit binaries, or "Visual Studio 2008 Beta 2 x64 Win64 Command Prompt" to build 64-bit binaries;

  • in the console, change the current directory to your TBB installation directory;
  • assuming the binary of your GNU make is called gmake.exe, run "gmake";

    • also, -r option passed to gmake is useful for faster compilation; it turns off the checks for built-in rules which are not used in TBB;

  • assuming you need 32-bit binaries, look for them in buildwindows_ia32_cl_vc9_release under the installation directory

    • for 64-bit binaries, replace ia32 with em64t in the name above
    • debug binaries will be in the similarly named directory but with _debug suffix

There also are more build instructions in build/index.html. Though it is said that a UNIX shell is required, GNU make is actually enough; all UNIX commands used to run in a shell were reworked to Windows commands and/or scripts.


I hope this helps.

Neeley's picture
Quoting - Alexey Kukanov (Intel)

The recent development release of TBB added the possibility to build the library with Visual Studio 2008 Beta 2. No special workarounds are required, usual TBB build procedure should work just fine. It means, you still need GNU make that works on Windows. The Make for Windowsfrom the GnuWin32 projectis my personal favourite; Cygwin (as described by Kevin) or other similar packagesshould also work well. Besides GNU make, no other UNIX utilities are required.

The build procedure is approximately the following:

  • ensure the gmake utility and its support libraries (if any) are in PATH;
  • from the Start Menu, launch the appropriate VS 2008 command-line console;
    • the shortcuts for that are located under "Visual Studio Tools"; select "Visual Studio 2008 Beta 2 Command Prompt" to build 32-bit binaries, or "Visual Studio 2008 Beta 2 x64 Win64 Command Prompt" to build 64-bit binaries;
  • in the console, change the current directory to your TBB installation directory;
  • assuming the binary of your GNU make is called gmake.exe, run "gmake";
    • also, -r option passed to gmake is useful for faster compilation; it turns off the checks for built-in rules which are not used in TBB;
  • assuming you need 32-bit binaries, look for them in buildwindows_ia32_cl_vc9_release under the installation directory
    • for 64-bit binaries, replace ia32 with em64t in the name above
    • debug binaries will be in the similarly named directory but with _debug suffix

There also are more build instructions in build/index.html. Though it is said that a UNIX shell is required, GNU make is actually enough; all UNIX commands used to run in a shell were reworked to Windows commands and/or scripts.

I hope this helps.

Will this procedure work for building TBB using VS2010 B2?

Vladimir Polin (Intel)'s picture
Quoting - Neeley

Will this procedure work for building TBB using VS2010 B2?

it should work

Login to leave a comment.