1

I've qt 4.8 with gcc 4.6.1 and I'd like to use intel's tbb in my project. What steps am I suppose to do in order to do that?

Tim Meyer
  • 12,210
  • 8
  • 64
  • 97
smallB
  • 16,662
  • 33
  • 107
  • 151

2 Answers2

4
  • Install tbb (including headers and libs)
  • Include the headers where necessary
  • Use the library where appropriate.
  • Link with tbb
111111
  • 15,686
  • 6
  • 47
  • 62
  • 1
    You're talking about installing tbb, yet the only thing I was able to find: http://threadingbuildingblocks.org/download.php doesn't have installator. It is just zipped file. – smallB Mar 02 '12 at 16:07
  • What OS, what version, what system architecture... it was a pretty vauge question with a pretty vague answer – 111111 Mar 02 '12 at 16:08
  • OS Windows 7, architecture x86 – smallB Mar 02 '12 at 16:11
  • So toy are using miniGW or cgywin or something? If so then your question should be how to install tbb on cygwin or something like that – 111111 Mar 02 '12 at 16:12
  • I have qt and gcc never heard of miniGW, don't have cygwin – smallB Mar 02 '12 at 16:18
  • Sorry I just don't anything about windows, I can't help you – 111111 Mar 02 '12 at 16:21
  • 1
    ... assuming you use QtCreator: unzip to a directory, add the full path to the dll to your LIBS in your .pro file, add include directory to your INCLUDEPATH in your .pro file. Done. –  Mar 08 '12 at 04:18
1

First of all, you have to build TBB dll files for MingW using this command

mingw32-make compiler=gcc arch=ia32 runtime=mingw tbb

taken from here in the directory where the main TBB Makefile is.

Community
  • 1
  • 1
ali_bahoo
  • 4,732
  • 6
  • 41
  • 63
  • @sad_mad I did it. Now for some bizarre reason I'm getting error that exception_ptr isn't a type even though I can see this header in bits/ directory – smallB Mar 02 '12 at 17:21
  • @smallB: seems like TBB tried to use C++11 features (namely, exception propagation) but the compiler did not enable it. Perhaps the TBB forum is a better place than SO to get it resolved. – Alexey Kukanov Mar 05 '12 at 13:12
  • @AlexeyKukanov: Indeed, the compiler is configured to disable it, by default. The question of #smallB is [here](http://stackoverflow.com/q/9537219/425817).I may ask the same thing in TBB forums as well. – ali_bahoo Mar 05 '12 at 14:50