I am attempting to compile this code so that I can analyze some images for my job. If there is a good explanation of how this code works, I would appreciate that, but right now I am just trying to get it to compile. I installed opencv (using sudo apt-get install libopencv-dev
), but for some reason the file cv.h
did not come with it. However, this file must have been previously installed under a random path (/usr/lib/perl/5.14.2/CORE/cv.h
) and so I included that one instead. I also included the appropriate highgui.h
file which installed normally with opencv. Here are my errors:
/usr/lib/perl/5.14.2/CORE/cv.h:14:5: error: ‘_XPV_HEAD’ does not name a type
/usr/lib/perl/5.14.2/CORE/cv.h:15:5: error: ‘_XPVCV_COMMON’ does not name a type
/usr/lib/perl/5.14.2/CORE/cv.h:16:5: error: ‘I32’ does not name a type
/usr/lib/perl/5.14.2/CORE/cv.h:196:9: error: ‘OP’ does not name a type
I kind of get what these errors mean, and have gotten them in code I have written before, but why am I getting them for code that seems to work for everyone else? Do I need to link something differently? Am using g++/gcc compiler, is something not updated correctly? I installed all recent update son my system... Not sure what else to try. Any thoughts?