2016-07-14 72 views
1

在我的OSX安裝opencv3後,我運行此命令庫未找到-lippicv

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

如果你使用Mac OSX編譯,我跑進同樣的問題,並找到了解決方案here,在「使用brew在Mac OSX上安裝OpenCV 3」,「故障排除」:

# 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/