News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Setting Up Threading Building Blocks

Started by donnyb, July 11, 2010, 02:07:08 PM

Previous topic - Next topic

donnyb

 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


donnyb

 Oh and now none of my programs I wrote will work weather they use treads or not I have to fix this problem

Jenna

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.

donnyb

 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

Jenna

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 `pkg-config tbb --cflags` in your projects "Compiler settings -> Other options:" and `pkg-config tbb --libs` in your projects "Linker settings -> Other linker options:" and that's it.

Be aware of the backticks in the code !