[yocto] Opencv headers

Ekaterini Voulgari sdi1100002 at di.uoa.gr
Mon Aug 19 03:48:47 PDT 2019


Hello all,
I'm trying to add a program to my image that uses opencv (#include 
<opencv2/opencv.hpp>), but I get compile error "fatal error: 
opencv2/opencv.hpp: No such file or directory"

The file opencv.hpp exists in workdir 
/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-musleabi/opencv/3.4.5-r0/image/usr/include/opencv2/opencv.hpp. 
Can anyone help on where are the headers located in crossbuilds? Any 
help appreciated.
The recipe:

SRC_URI = "file://capture.cpp"

do_compile () {
     ${CC} capture.cpp  -lopencv_core -lopencv_imgproc -lopencv_highgui 
-lopencv_videoio
}

do_install () {

         install -d -m 0755 ${D}/${bindir}
         install -m 0755 prog_kameras ${D}/${bindir}/prog_kameras
}



More information about the yocto mailing list