On OSX, it is DYLD_LIBRARY_PATH instead of LD_LIBRARY_PATH
How to use TBB with gcc on OSX?
-
03-10-2022 - |
Question
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:
Download the source.
install using
make
.Specify
PATH
,LD_LIBRARY_PATH
,LIBRARY_PATH
andCPATH
.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
Solution
OTHER TIPS
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow