Author Topic: Setting Up Threading Building Blocks  (Read 6361 times)

Offline donnyb

  • Single posting newcomer
  • *
  • Posts: 5
Setting Up Threading Building Blocks
« on: July 11, 2010, 02:07:08 pm »
 I am having a heck of a time setting up my ttb to work with my code::blocks
 I have set these things:
 LD_LIBRARY_PATH = Currentdirectory/build/debug
 set search directory to  Currentdirectory/include
 set links to libtbb_debug.so and libtbbmalloc_debug.so

 set enviroment varablies
 L = Currentdirectory/build/debug
 l = tbb_debug
 
 and set the search directories of compiler, links, resource complier to
Currentdirectory/build/debug

 Now the program will run but in the terminal it says it can not file libtbb_debug.so.2, so I added it to the linker
 Anyway I am running ubuntu and can not figure out why this is happening?
 Has anyone used code::blocks with TBB and ubuntu.
 Or knows why I am having this problem. Is it the operating system that can not find it or the compiler.
 Thanks,
 Donald

P.S. My program is just a main initializing one task

 

Offline donnyb

  • Single posting newcomer
  • *
  • Posts: 5
Re: Setting Up Threading Building Blocks
« Reply #1 on: July 11, 2010, 02:15:28 pm »
 Oh and now none of my programs I wrote will work weather they use treads or not I have to fix this problem

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Setting Up Threading Building Blocks
« Reply #2 on: July 11, 2010, 05:13:17 pm »
If you use libtbb from the repo (is it in Ubuntu? it's at least in debians repos), you should either use pkg-config to set it up or ad tbb to the linker libs.

Everything else should not be necessary, because the includes and libs are in the systems standard place as used by the example.

Offline donnyb

  • Single posting newcomer
  • *
  • Posts: 5
Re: Setting Up Threading Building Blocks
« Reply #3 on: July 29, 2010, 06:13:45 am »
 I know I sound like an idiot here, but what do you mean by using the debians repos. I have installed it with my synapic package manager and it will not work. It even gives me problems over a simple pthread. If you could give me more details maybe I could figure it out. I normally install packages no problem, but this one is causing me a lot of grief.
 Thanks in advance,
  Donald

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Setting Up Threading Building Blocks
« Reply #4 on: July 29, 2010, 07:29:11 am »
I did not tell you to use debian repos.
I only wrote that tbb is in debian repos, but I don't know whether it is in ubuntu.

Install libtbb-dev and remove all the settings you have made to get it working (LD_LIBRARY_PATH and so on).

put
Code
`pkg-config tbb --cflags`
in your projects "Compiler settings -> Other options:" and
Code
`pkg-config tbb --libs`
in your projects "Linker settings -> Other linker options:" and that's it.

Be aware of the backticks in the code !