سؤال

How to install Intel Threading Building Blocks on OSX 10.9, so it can be used with gcc?

I tried to do what usually works for me on Linux:

  1. Download the source.

  2. install using make.

  3. Specify PATH, LD_LIBRARY_PATH, LIBRARY_PATH and CPATH.

  4. Use like

    g++ mycode.cpp -O3 -o mycode -ltbb
    

result:

dyld: Library not loaded: libtbb.dylib
  Referenced from: /blabla/mycode
  Reason: image not found
Trace/BPT trap: 5
هل كانت مفيدة؟

المحلول

On OSX, it is DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH

نصائح أخرى

You can install it via Homebrew:

$ brew install tbb

That takes care of the lib paths, so you only have to add -ltbb to the linker flags.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top