title: Visual Studio Intel Threading Building Blocks DLL error
body: <p>I am using an example of Intel TBB code I found on SO:</p>
  
  <pre><code>#include "tbb/blocked_range.h"
  #include "tbb/parallel_for.h"
  #include "tbb/task_scheduler_init.h"
  #include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  struct mytask {
    mytask(size_t n)
      :_n(n)
    {}
    void operator()() {
      for (int i=0;i&lt;1000000;++i) {}  // Deliberately run slow
      std::cerr &lt;&lt; "[" &lt;&lt; _n &lt;&lt; "]";
    }
    size_t _n;
  };
  
  struct executor
  {
    executor(std::vector&lt;mytask&gt;&amp; t) :_tasks(t)
    {}
    executor(executor&amp; e,tbb::split) :_tasks(e._tasks)
    {}
  
    void operator()(const tbb::blocked_range&lt;size_t&gt;&amp; r) const {
      for (size_t i=r.begin();i!=r.end();++i)
        _tasks[i]();
    }
  
    std::vector&lt;mytask&gt;&amp; _tasks;
  };
  
  int main(int,char**) {
  
    tbb::task_scheduler_init init;  // Automatic number of threads
    // tbb::task_scheduler_init init(2);  // Explicit number of threads
  
    std::vector&lt;mytask&gt; tasks;
    for (int i=0;i&lt;1000;++i){
          tasks.push_back(mytask(i));
    }
    executor exec(tasks);
    tbb::parallel_for(tbb::blocked_range&lt;size_t&gt;(0,tasks.size()),exec);
    std::cerr &lt;&lt; std::endl;
  
    return 0;
  }
  </code></pre>
  
  <p>The code builds fine, but when I go to run I get the error:</p>
  
  <blockquote>
    <p>The program can't start because tbb_debug.dll is missing from your
    computer. Try reinstalling the program to fix this problem.</p>
  </blockquote>
  
  <p>I think this is probably the path I need to set somewhere within VS2012:</p>
  
  <pre><code>C:\Program Files (x86)\Intel\Composer XE 2013 SP1\redist\ia32\tbb\vc11
  </code></pre>
  
  <p>because it contains tbb_debug.dll.</p>
  
  <p>Where does this path need to be set?</p>
  
  <p>EDIT: I tried setting in the "Executable directories" path section but that didnt work.</p>