When compiling some code with opencv
I get this error
# g++ txtbin-03.1.cpp -o txtbin `pkg-config opencv --cflags --libs`
/usr/bin/ld: cannot find -lippicv
collect2: error: ld returned 1 exit status
# apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
# apt-get install libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
# cd /var/bin && git clone https://github.com/Itseez/opencv.git && cd opencv
# cmake . && make -j2 && make install
In my case, all it took was to copy libippicv.a from the OpenCV SDK to /usr/local/lib:
sudo cp 3rdparty/ippicv/unpack/ippicv_lnx/lib/intel64/libippicv.a /usr/local/lib/
Recompile OpenCv using following option:
cmake -DWITH_IPP=ON . && make -j $(nproc) && make install
Recompiling whole library isn't necessary, especially if you don't need this library. I found great and instantly working solution here. In case link expired or broke:
The solution is simply to remove -lippicv
from opencv pkg-config configuration file. So you have to locate opencv.pc
file, which default is in /usr/local/lib/pkgconfig/
directory. Then from section Libs:
just remove aforementioned library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With