在我的OSX上安装opencv3后,运行此命令
g++ -ggdb `pkg-config --cflags --libs opencv` facedetect.cpp -o /tmp/test && /tmp/test
我收到了这个错误
ld: library not found for -lippicv
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:0)
如果您正在使用Mac OSX进行编译,我遇到了同样的问题,并在“使用brew安装Mac OSX上的OpenCV 3”,“疑难解答”下找到了解决方案here:
# Find ippicv
find /usr/local -name "libippicv.a"
# For me it is /usr/local/Cellar/opencv3/3.1.0_3/share/OpenCV/3rdparty/lib/libippicv.a
# Make a symlink to /usr/local/lib
ln -s /some/path/OpenCV/3rdparty/lib/libippicv.a /usr/local/lib/
# I used
ln -s /usr/local/Cellar/opencv3/3.1.0_3/share/OpenCV/3rdparty/lib/libippicv.a /usr/local/lib/