Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ld: library not found for -llibtbb.dylib

Tags:

opencv

I try to compile some files from the opencv-2.4.8/apps/haarfinder but i get the following error:

ld: library not found for -llibtbb.dylib

Notice the double l in the filename.

I try to follow the tutorial here: http://coding-robin.de/2013/07/22/train-your-own-opencv-haar-classifier.html

And in the comments i readed:

After many, many hours of pondering and looking around. I decided to take it as a spelling error in some file so I decided to look into opencv files and search for that "-llibtbb" and finally found it. I corrected it to only "libtbb" and its finally working.

Sadly he didn't mention what file that was. I tried with sublime 'Find in files' but i can't find it.

Can someone else take a look or help me in another way? Like if i know where libtbb.dylib is stored i might be able to duplicate it and add the spelling error myself.

please help, i'm lost :)

like image 657
clankill3r Avatar asked Apr 29 '14 11:04

clankill3r


People also ask

What is LD command in Mac?

ld interprets your command ld -lpacket as a request to link a complete program executable from the object files in the specified library.


2 Answers

If the libtbb.dylib file already exists like in my case in the /usr/local/lib folder then all you need to do is to run this command: export DYLD_LIBRARY_PATH=/usr/local/lib

like image 67
arturgrigor Avatar answered Sep 18 '22 15:09

arturgrigor


Suppose libtbb.dylib is in /usr/local/lib/libtbb.dylib and opencv.pc is in /usr/local/lib/pkgconfig (The location may vary depending on where you install tbb and pkg-config)

Then edit /usr/local/lib/pkgconfig/opencv.pc, change -llibtbb.dylib to /usr/local/lib/libtbb.dylib

like image 31
yangjie Avatar answered Sep 18 '22 15:09

yangjie