I have prepared a setup.py file which requires the opencv libraries contrib,core and highgui. But when I build the setup.py I get an error saying
/usr/bin/ld:cannot find -lcontrib
/usr/bin/ld:cannot find -lcore
/usr/bin/ld:cannot find -lhighgui
I added an entry, "include /usr/local/lib" to the ld.so.conf file and ran the command ldconfig from the terminal. Still getting the same error. Please advice.
The linker flags should be -lopencv_contrib
, -lopencv_core
and -lopencv_highgui
for a standard OpenCV2.4+ install from source or when using pre-built binaries. Also make sure these libraries do exist in /usr/local/lib
. You could run ls /usr/local/lib | grep opencv
ls /usr/local/lib | grep opencv
to see if they exist.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.