I'm trying to build some tests for threading building blocks. Unfortunately, I'm unable to configure the tbb library. The linker cannot find the library tbb. I've tried running the scripts in bin directory which has not helped. I've even tried moving the library f开发者_运维技巧iles to /usr/local/lib/ which was again a flop. Any suggestions would be helpful.
Determine where you have put the tbb/lib folder, and then add the path to the library to the LD_LIBRARY_PATH environment variable, either manually or in ~/.bashrc.
Example:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib/tbb/lib/intel64/gcc4.4
Then, compile the program using g++
- with the
-I
flag pointing at the header files directory - the
-L
flag pointing at the library directory - and
-ltbb
Example:
g++ program.cpp -o program -I/usr/local/lib/tbb/include -L/usr/local/lib/tbb/lib/intel64/gcc4.4 -ltbb
- with the
After building/installing and making sure that /etc/ld.so.conf has the proper listing for the directories pointing to where your libraries are stored, you might want to try and run sudo ldconfig
on the command-line and see if that changes anything.
Hope this helps,
Jason
精彩评论