Ofxcv compile error fixed

with the most recent version of xcode (4.3) I got a compiling error (see attached image) about ofxcv library., stating “Utilities.h, Semantic Issue: Call to function ‘getCvImageType’ that is neither visible in the template definition nor found by argument-dependent lookup”

The two changes made to get this to run without errors:

  1. /addons/ofxCv/libs/ofxCV/include/ofxCV/Utilities.h

move everything in the first function getCvImageType beginning with:
// toCv functions
Mat toCv(Mat& mat);
pixels.setFromExternalPixels(mat.ptr(), mat.cols, mat.rows, mat.channels());

to the very bottom of the file.

  1. in /addons/ofxCV/libs/ofxCv/include/ofxCv/tracker.h:

move the following two lines from the bottom, to the line directly succeding the line “using namespace cv;” at the very top:

float trackingDistance(const cv::Rect& a, const cv::Rect& b);
float trackingDistance(const cv::Point2f& a, const cv::Point2f& b);

did you use the examples that come with ofxcv, or try to create your own new project? the examples have the libraries linked correctly.

Chiming in - this fixed the problem for me, using this repository of ofxCV2: https://github.com/alvarohub/ofxCv2

Hey guys! I know this is a 3 year old topic, but I am interest in using this project in an artwork for my graduation. Is there any chance this will compile in xcode 6.3.2 ? I am now two days just trying to make it work…but as I am a beginner, it is being hard to do it on my own.

I have used the repository of ofxCV2 but still same error as Gabriella. So I followed her instructions, and now about 48 errors. I am not sure if this are erros made by some mistake while changing the classes, however.

(As a new member I can’t upload pictures, this is the link to the error file on my dropbox)
dropbox.com / s / oogh4jjp9in632s / ERRORS . jpg

Any suggestions please?

thank you all