ld: library not found for -llibtbb.dylib

后端 未结 5 2341
忘掉有多难
忘掉有多难 2021-02-14 08:41

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

Notic

5条回答
  •  清歌不尽
    2021-02-14 09:27

    IOutput is an interface where their methods are declared at ioutput.h and must be implemented somewhere. I found out they were implemented at cvsamplesoutput.cpp so we just need ask gcc to compile that file. For that the correct command should be:

    g++ `pkg-config --libs --cflags opencv | sed 's/libtbb\.dylib/tbb/' ` -I. -o mergevec mergevec.cpp cvboost.cpp cvcommon.cpp cvsamples.cpp cvhaarclassifier.cpp cvhaartraining.cpp cvsamplesoutput.cpp -lopencv_core -lopencv_calib3d -lopencv_imgproc -lopencv_highgui -lopencv_objdetect
    

提交回复
热议问题