Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

unable to find opencv through pkg-config --cflags opencv

i followed this comprehensive guide to install opencv4.1.0 in my ubuntu18.04.

Blockquote

https://cv-tricks.com/installation/opencv-4-1-ubuntu18-04/

Blockquote i made changes in my opencv4.pc file, added opencv2 as mentioned in install guide (includedir_old=${prefix}/include/opencv4/opencv2) and added this file to /usr/local/lib/pkg-config. i also added this path PKG_CONFIG_PATH=/usr/local/lib/pkg-config to bashrc file. i counter checked by echo command it shows the path rightly

but when i do pkg-config for opencv it still says Package opencv was not found in the pkg-config search path. Perhaps you should add the directory containing `opencv.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv', required by 'world', not found

what should i do? because of this i am unable to cmake c++ file

unable to find opencv through pkg-config --cflags opencv

i followed this comprehensive guide to install opencv4.1.0 in my ubuntu18.04.

Blockquote

https://cv-tricks.com/installation/opencv-4-1-ubuntu18-04/

Blockquote i made changes in my opencv4.pc file, added opencv2 as mentioned in install guide (includedir_old=${prefix}/include/opencv4/opencv2) and added this file to /usr/local/lib/pkg-config. i also added this path PKG_CONFIG_PATH=/usr/local/lib/pkg-config to bashrc file. i counter checked by echo command it shows the path rightly

but when i do pkg-config for opencv it still says Package opencv was not found in the pkg-config search path. Perhaps you should add the directory containing `opencv.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv', required by 'world', not found

what should i do? because of this i am unable to cmake c++ file file

unable to find opencv through pkg-config --cflags opencv

i followed this comprehensive guide to install opencv4.1.0 in my ubuntu18.04.

https://cv-tricks.com/installation/opencv-4-1-ubuntu18-04/

i made changes in my opencv4.pc file, added opencv2 as mentioned in install guide (includedir_old=${prefix}/include/opencv4/opencv2) and added this file to /usr/local/lib/pkg-config. i also added this path PKG_CONFIG_PATH=/usr/local/lib/pkg-config to bashrc file. i counter checked by echo command it shows the path rightly

but when i do pkg-config for opencv it still says Package opencv was not found in the pkg-config search path. Perhaps you should add the directory containing `opencv.pc' to the PKG_CONFIG_PATH environment variable Package 'opencv', required by 'world', not found

what should i do? because of this i am unable to cmake c++ file